ToElementTuple extends KorypheFunction<Element, ElementTuple> { @Override public ElementTuple apply(final Element element) { if (isNull(element)) { return null; } return new ElementTuple(element); }  @Override ElementTuple apply(final Element element);  }
@Test public void shouldReturnNullForNullValue() { final ToElementTuple function = new ToElementTuple(); final Object result = function.apply(null); assertNull(result); }
@Test public void shouldConvertAnElementIntoAnElementTuple() { final Element element = new Entity.Builder() .group(TestGroups.ENTITY) .vertex("vertex1") .property(TestPropertyNames.COUNT, 1) .build(); final ToElementTuple function = new ToElementTuple(); final Object result = function.apply(element); assertEquals(new ElementTuple(element), result); }