Buggy code:
@ Controller @ RequestMapping ( "//dspace" ) public class SubspaceServiceImpl implements SubspaceService { private 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 UriFactory uriFactory ; private Facets subspaceFacets ; @ PostConstruct public final void init ( ) { } public void setUriFactory ( UriFactory uriFactory ) { } @ Override @ RequestMapping ( value = "//_{subspace}" , method = RequestMethod . GET ) public final ResponseEntity < Facets > listAvailableFacets ( @ PathVariable final String subspace , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}" , method = RequestMethod . PUT ) public final ResponseEntity < Facets > createSubspace ( @ PathVariable final String subspace , @ RequestBody final String config , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}" , method = RequestMethod . DELETE ) public final ResponseEntity < Specifier < Void > > deleteSubspace ( @ PathVariable final String subspace , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//slicekinds" , method = RequestMethod . GET ) public final ResponseEntity < List < Specifier < Void > > > listSliceKinds ( @ PathVariable final String subspace , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//_{slicekind}" , method = RequestMethod . PUT ) public final ResponseEntity < List < Specifier < Void > > > createSliceKind ( @ PathVariable final String subspace , @ PathVariable final String slicekind , final String config , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//config" , method = RequestMethod . GET ) public final ResponseEntity < Configuration > listSubspaceConfiguration ( @ PathVariable final String subspace , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//config" , method = RequestMethod . PUT ) public final ResponseEntity < Void > setSubspaceConfiguration ( @ PathVariable final String subspace , @ RequestBody final Configuration config , @ RequestHeader ( "DN" ) final String dn ) { } @ Override @ RequestMapping ( value = "//_{subspace}//_{sliceKind}" , method = RequestMethod . POST ) public final ResponseEntity < Specifier < Void > > createSlice ( @ PathVariable final String subspace , @ PathVariable final String sliceKind , @ RequestBody final String config , @ RequestHeader ( "DN" ) final String dn ) { GNDMSResponseHeader headers = setHeaders ( subspace , sliceKind , dn ) ; try { Map < String , String > parameters = new HashMap < String , String > ( ) ; ParameterTools . parseParameters ( parameters , config , null ) ; if ( ! ( parameters . containsKey ( "deadline" ) ) ) throw new WrongConfigurationException ( "Missing<seq2seq4repair_space>configuration<seq2seq4repair_space>option" ) ; if ( ! ( parameters . containsKey ( "sliceSize" ) ) ) throw new WrongConfigurationException ( "Missing<seq2seq4repair_space>configuration<seq2seq4repair_space>option" ) ; DateTimeFormatter fmt = ISODateTimeFormat . dateTimeParser ( ) ; DateTime deadline = fmt . parseDateTime ( parameters . get ( "deadline" ) ) ; String slice = sliceProvider . createSlice ( subspace , sliceKind , dn , deadline . toGregorianCalendar ( ) , Long . parseLong ( parameters . get ( "sliceSize" ) ) ) ; Specifier < Void > spec = new Specifier < Void > ( ) ; HashMap < String , String > urimap = new HashMap < String , String > ( 2 ) ; urimap . put ( "service" , "dspace" ) ; urimap . put ( SUBSPACE , subspace ) ; urimap . put ( SLICEKIND , sliceKind ) ; urimap . put ( SLICE , slice ) ; spec . setUriMap ( new HashMap < String , String > ( urimap ) ) ; <START_BUG> spec . setUrl ( uriFactory . quoteUri ( urimap ) ) ; <END_BUG> return new ResponseEntity < Specifier < Void > > ( spec , headers , HttpStatus . OK ) ; } catch ( WrongConfigurationException e ) { logger . warn ( e . getMessage ( ) ) ; return new ResponseEntity < Specifier < Void > > ( null , headers , HttpStatus . BAD_REQUEST ) ; } catch ( NoSuchElementException e ) { logger . warn ( e . getMessage ( ) ) ; return new ResponseEntity < Specifier < Void > > ( null , headers , HttpStatus . NOT_FOUND ) ; } catch ( ParameterTools e ) { logger . info ( ( ( ( "Illegal<seq2seq4repair_space>request:<seq2seq4repair_space>Could<seq2seq4repair_space>not<seq2seq4repair_space>parse<seq2seq4repair_space>paramter<seq2seq4repair_space>string<seq2seq4repair_space>\"" + ( ParameterTools . escape ( config ) ) ) + "\".<seq2seq4repair_space>" ) + ( e . getMessage ( ) ) ) ) ; return new ResponseEntity < Specifier < Void > > ( null , headers , HttpStatus . BAD_REQUEST ) ; } } private GNDMSResponseHeader setHeaders ( final String subspace , final String sliceKind , final String dn ) { } private GNDMSResponseHeader setSubspaceHeaders ( final String subspace , final String dn ) { } public final String getBaseUrl ( ) { } public final void setBaseUrl ( final String baseUrl ) { } public final SubspaceProvider getSubspaceProvider ( ) { } @ Inject public final void setSubspaceProvider ( final SubspaceProvider subspaceProvider ) { } public final Facets getSubspaceFacets ( ) { } public final void setSubspaceFacets ( final Facets subspaceFacets ) { } public final EntityManagerFactory getEmf ( ) { } @ PersistenceUnit public final void setEmf ( final EntityManagerFactory emf ) { } public void setSliceProvider ( SliceProviderImpl sliceProvider ) { } public void setSliceKindProvider ( SliceKindProviderImpl sliceKindProvider ) { } }

Fix:
spec . setUrl ( uriFactory . sliceUri ( urimap , null ) ) ;