Topics extends HttpRequestHandler { private String nosys() { try { return new ObjectMapper() .writeValueAsString(Topic.NEXUS.keySet().stream().filter(topicName -> !topicName.startsWith("$SYS")) .map(key -> Topic.NEXUS.get(key)).collect(Collectors.toList())); } catch (JsonProcessingException e) { logger.error(e.getMessage(), e); return null; } }  @Override String service();  }
@Test public void testNosys() throws Exception { HttpClient client = new HttpClient("http: HttpResponse res = client.get(); Assert.assertEquals(HttpResponseStatus.OK, res.status()); Assert.assertTrue(res.content().toString(CharsetUtil.UTF_8).startsWith("[")); Assert.assertTrue(res.content().toString(CharsetUtil.UTF_8).endsWith("]")); }