GeneratorBasedJsonHomeSource implements JsonHomeSource { @Override public final JsonHome getJsonHome() { if (jsonHome == null) { synchronized (this) { if (jsonHome == null) { LOG.info("Generating JsonHome..."); jsonHome = jsonHomeGenerator.with(controllerTypes).generate(); LOG.info("Generated JsonHome containing {} relation types.", jsonHome.getResources().size()); } } } return jsonHome; }  @Autowired void setJsonHomeGenerator(final JsonHomeGenerator jsonHomeGenerator); @Autowired void setApplicationContext(final ApplicationContext applicationContext); void setControllerTypes(final Class<?>... controllerTypes); @Override final JsonHome getJsonHome();  }
@Test public void shouldReturnJsonHomeInstance() { final JsonHomeSource jsonHomeControllerBase = getJsonHomeSource(); final JsonHome jsonHome = jsonHomeControllerBase.getJsonHome(); assertNotNull(jsonHome); }