### Question:
EntityUtils { public static Long[] ids(Iterable<? extends Entity> entities) { List<Long> result = new LinkedList<>(); for (Entity entity : entities) { result.add(entity.getId()); } return result.toArray(new Long[result.size()]); } private  EntityUtils(); static Map<Long, T> entitiesToMap(Collection<T> entities); static Long[] ids(Iterable<? extends Entity> entities); static String valueToString(Object value); static Map<String, Object> propertiesToMap(Entity Entity); static Map<String, Object> propertiesToMap(Entity Entity, ObjectInclusionPolicy<String> propertyInclusionPolicy); static int deleteNodeAndRelationships(Node toDelete); static String nodeToString(Node node); static String relationshipToString(Relationship relationship); static String propertiesToString(Entity Entity); static int getInt(Entity Entity, String key); static int getInt(Entity Entity, String key, int defaultValue); static long getLong(Entity Entity, String key); static long getLong(Entity Entity, String key, long defaultValue); static float getFloat(Entity Entity, String key); static float getFloat(Entity Entity, String key, float defaultValue);  }### Answer:
@Test public void shouldFindNodeIds() { try (Transaction tx = database.beginTx()) { assertEquals("[0, 1, 2]", Arrays.toString(ids(database.getAllNodes()))); } }
@Test public void shouldFindRelationshipIds() { try (Transaction tx = database.beginTx()) { assertEquals("[0]", Arrays.toString((ids(database.getAllRelationships())))); } }