LogService { public void createEntry(LogEntry logEntry) { logEntry.setLogtime(new Date()); try { httpClient.post(Property.LOGGER_REST_URL.getURL(), logEntry); } catch (HttpException e) { LOG.error("Failed to send logs over REST", e); } }  void createEntry(LogEntry logEntry);  }
@Test public void testCreateEntry_absolutePath() throws Exception { Property.LOGGER_REST_URL.setValue("http: logService.createEntry(testEntry); verify(httpClient).post(new URL("http: }
@Test public void testCreateEntry_relativePath() throws Exception { Property.LOGGER_REST_URL.setValue("/api/log"); logService.createEntry(testEntry); verify(httpClient).post(new URL("http: }
@Test public void testCreateEntry_relativePath_missingSlash() throws Exception { Property.LOGGER_REST_URL.setValue("api/log"); logService.createEntry(testEntry); verify(httpClient).post(new URL("http: }