public ExternalSystemResourceAssembler() {
super(ExternalSystemController.class, ExternalSystemResource.class);
}</BUG>
@Override
public ExternalSystemResource toResource(ExternalSystem entity) {
<BUG>return builder.get().addExternalSystem(entity)

.addLink(ControllerLinkBuilder.linkTo(ExternalSystemController.class, entity.getProjectRef()).slash(entity).withSelfRel())
.build();</BUG>
}

package com.epam.ta.reportportal.ws.converter;
import com.epam.ta.reportportal.database.entity.ExternalSystem;
import com.epam.ta.reportportal.ws.converter.builders.ExternalSystemResourceBuilder;
import com.epam.ta.reportportal.ws.model.externalsystem.ExternalSystemResource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.inject.Provider;
@Service
public class ExternalSystemResourceAssembler extends ResourceAssembler<ExternalSystem, ExternalSystemResource> {
@Autowired
private Provider<ExternalSystemResourceBuilder> builder;
@Override
public ExternalSystemResource toResource(ExternalSystem entity) {
return builder.get().addExternalSystem(entity).build();
