Buggy code:
@ Controller @ RequestMapping ( "//dspace" ) public class SliceServiceImpl implements SliceService { protected final Logger logger = LoggerFactory . getLogger ( this . getClass ( ) ) ; private EntityManagerFactory emf ; private EntityManager em ; private String baseUrl ; private SubspaceProvider subspaceProvider ; private SliceKindProvider sliceKindProvider ; private SliceProvider sliceProvider ; private List < String > sliceFacetNames ; private UriFactory uriFactory ; private GNDMSystem system ; private RestTemplate restTemplate ; @ Inject public void setSliceKindProvider ( SliceKindProvider sliceKindProvider ) { } @ Inject public void setSliceProvider ( SliceProvider sliceProvider ) { } public void setUriFactory ( UriFactory uriFactory ) { } @ PostConstruct public final void init ( ) { } @ Override @ RequestMapping ( value = "//_{subspaceId}//_{sliceKindId}//_{sliceId}" , method = RequestMethod . GET ) public final ResponseEntity < Facets > listSliceFacets ( @ PathVariable final String subspaceId , @ PathVariable final String sliceKindId , @ PathVariable final String sliceId , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//_{sliceKind}//_{slice}//config" , method = RequestMethod . PUT ) public final ResponseEntity < Void > setSliceConfiguration ( @ PathVariable final String subspace , @ PathVariable final String sliceKind , @ PathVariable final String slice , @ RequestBody final Configuration config , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//_{sliceKind}//_{slice}" , method = RequestMethod . POST ) public final ResponseEntity < Specifier < Void > > transformSlice ( @ PathVariable final String subspace , @ PathVariable final String sliceKind , @ PathVariable final String slice , @ RequestBody final Specifier < Void > newSliceKind , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspaceId}//_{sliceKindId}//_{sliceId}" , method = RequestMethod . DELETE ) public final ResponseEntity < Specifier < Facets > > deleteSlice ( @ PathVariable final String subspaceId , @ PathVariable final String sliceKindId , @ PathVariable final String sliceId , @ RequestHeader ( "DN" ) final String dn ) { GNDMSResponseHeader headers = setHeaders ( subspaceId , sliceKindId , sliceId , dn ) ; try { final Taskling ling = sliceProvider . deleteSlice ( subspaceId , sliceId ) ; <START_BUG> final TaskClient client = new TaskClient ( "" ) ; <END_BUG> client . setRestTemplate ( restTemplate ) ; final Specifier < Facets > spec = TaskServiceAux . getTaskSpecifier ( client , ling . getId ( ) , uriFactory , null , dn ) ; return new ResponseEntity < Specifier < Facets > > ( spec , headers , HttpStatus . OK ) ; } catch ( NoSuchElementException ne ) { logger . warn ( ne . getMessage ( ) ) ; return new ResponseEntity < Specifier < Facets > > ( null , headers , HttpStatus . NOT_FOUND ) ; } } @ Override @ RequestMapping ( value = "//_{subspace}//_{sliceKind}//_{sliceId}//files" , method = RequestMethod . GET ) public final ResponseEntity < List < File > > listFiles ( @ PathVariable final String subspace , @ PathVariable final String sliceKind , @ PathVariable final String sliceId , @ RequestParam ( value = "attr" , required = false ) final Map < String , String > attr , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//_{sliceKind}//_{slice}//files" , method = RequestMethod . DELETE ) public final ResponseEntity < Void > deleteFiles ( @ PathVariable final String subspace , @ PathVariable final String sliceKind , @ PathVariable final String slice , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//_{sliceKind}//_{slice}//gsiftp" , method = RequestMethod . GET ) public final ResponseEntity < String > getGridFtpUrl ( @ PathVariable final String subspace , @ PathVariable final String sliceKind , @ PathVariable final String slice , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//_{sliceKind}//_{sliceId}//_{fileName}" , method = RequestMethod . GET ) public final ResponseEntity < Void > listFileContent ( @ PathVariable final String subspace , @ PathVariable final String sliceKind , @ PathVariable final String sliceId , @ PathVariable final String fileName , @ RequestHeader ( "ATTRS" ) final List < String > attrs , @ RequestHeader ( "DN" ) final String dn , final OutputStream out ) { } @ Override @ RequestMapping ( value = "//_{subspace}//_{sliceKind}//_{sliceId}//_{fileName}" , method = RequestMethod . PUT ) public final ResponseEntity < Void > setFileContent ( @ PathVariable final String subspace , @ PathVariable final String sliceKind , @ PathVariable final String sliceId , @ PathVariable final String fileName , @ RequestBody final MultipartFile file , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//_{sliceKind}//_{slice}//_{fileName}" , method = RequestMethod . DELETE ) public final ResponseEntity < Void > deleteFile ( @ PathVariable final String subspace , @ PathVariable final String sliceKind , @ PathVariable final String slice , @ PathVariable final String fileName , @ RequestHeader ( "DN" ) final String dn ) { } private List < Facet > listFacetsOfSlice ( String subspaceId , String sliceKindId , String sliceId ) { } private GNDMSResponseHeader setHeaders ( final String subspace , final String sliceKind , final String slice , final String dn ) { } private Slice findSliceOfKind ( final String subspaceId , final String sliceKindId , final String sliceId ) throws NoSuchElementException { } public final String getBaseUrl ( ) { } public final void setBaseUrl ( final String baseUrl ) { } public final List < String > getSliceFacetNames ( ) { } public final void setSliceFacetNames ( final List < String > sliceFacetNames ) { } @ Inject public final void setSubspaceProvider ( SubspaceProvider subspaceProvider ) { } public GNDMSystem getSystem ( ) { } @ Inject public void setSystem ( GNDMSystem system ) { } @ Inject public void setRestTemplate ( RestTemplate restTemplate ) { } }

Fix:
final TaskClient client = new TaskClient ( baseUrl ) ;