RootConverter { public RootRest convert() { RootRest rootRest = new RootRest(); rootRest.setDspaceName(configurationService.getProperty("dspace.name")); rootRest.setDspaceUI(configurationService.getProperty("dspace.ui.url")); rootRest.setDspaceServer(configurationService.getProperty("dspace.server.url")); return rootRest; }  RootRest convert();  }
@Test public void testReturnCorrectClass() throws Exception { assertEquals(rootConverter.convert().getClass(), RootRest.class); }
@Test public void testCorrectPropertiesSetFromConfigurationService() throws Exception { String restUrl = "rest"; RootRest rootRest = rootConverter.convert(); assertEquals("dspaceurl", rootRest.getDspaceUI()); assertEquals("dspacename", rootRest.getDspaceName()); assertEquals(restUrl, rootRest.getDspaceServer()); }
@Test public void testReturnNotNull() throws Exception { assertNotNull(rootConverter.convert()); }