@Test public void testEnrich() throws Exception { HostFromJSONListAdapter hja = new HostFromJSONListAdapter(expectedKnownHostsString); JSONObject actualMessage = hja.enrich(new CacheKey("dummy", ip, null)); Assert.assertNotNull(actualMessage); Assert.assertEquals(expectedMessage, actualMessage); actualMessage = hja.enrich(new CacheKey("dummy", ip1, null)); JSONObject emptyJson = new JSONObject(); Assert.assertEquals(emptyJson, actualMessage); }
@Test public void testInitializeAdapter() throws Exception { HostFromJSONListAdapter hja = new HostFromJSONListAdapter(expectedKnownHostsString); Assert.assertTrue(hja.initializeAdapter()); }