Service implements AutoCloseable { public List<Object> findCreatorsOfSoftware(String softwareName) throws Exception { return g.V().has("software", "name", softwareName). in("created"). values("name").toList(); } private  Service(); static Service instance(); List<Object> findCreatorsOfSoftware(String softwareName); @Override void close();  }
@Test public void shouldCreateGraph() throws Exception { final List<Object> result = service.findCreatorsOfSoftware("lop"); assertThat(result, is(Arrays.asList("marko", "josh", "peter"))); }