RegistriesController { @Rel("/rel/jsonhome/registries") @RequestMapping( value = "/registries", method = RequestMethod.GET, produces = "application/json") @ResponseBody public Map<String, ?> getRegistries(final HttpServletResponse response) { response.setStatus(SC_OK); return registriesToJson(applicationBaseUri, registryRepository); }  @Value("${jsonhome.applicationBaseUri}") void setApplicationBaseUri(final String baseUri); @Autowired void setRegistryRepository(final RegistryRepository registryRepository); @Rel("/rel/jsonhome/registries") @RequestMapping( value = "/registries", method = RequestMethod.GET, produces = "application/json") @ResponseBody Map<String, ?> getRegistries(final HttpServletResponse response); @Rel("/rel/jsonhome/registry") @RequestMapping( value = "/registries/{registryName}", method = RequestMethod.GET, produces = "application/json") @ResponseBody Map<String, ?> getRegistry(@PathVariable
                                      @Doc("The name of the requested registry.")
                                      final String registryName,
                                      final HttpServletResponse response); @Rel("/rel/jsonhome/registry") @RequestMapping( value = "/registries/{registryName}", method = RequestMethod.PUT) void putRegistry(@PathVariable
                            @Doc("The name of registry.")
                            final String registryName,
                            @RequestBody
                            final Map<String, Object> registry,
                            final HttpServletResponse response); @Rel("/rel/jsonhome/registry") @RequestMapping( value = "/registries/{registryName}", method = RequestMethod.DELETE) void deleteRegistry(@PathVariable final String registryName,
                               final HttpServletResponse response); @ResponseStatus(value = BAD_REQUEST, reason = "Illegal resource format") @ExceptionHandler({IllegalArgumentException.class, NullPointerException.class}) void handleBadRequest();  }
@Test public void shouldReturnEmtpyRegistriesResource() { final MockHttpServletResponse response = new MockHttpServletResponse(); final Map<String, ?> registries = registriesController.getRegistries(response); assertEquals(registries, emptyRegistries()); assertEquals(response.getStatus(), SC_OK); }