ToTypeValue extends KorypheFunction<Object, TypeValue> { @Override public TypeValue apply(final Object value) { return new TypeValue(null, null != value ? value.toString() : null); }  @Override TypeValue apply(final Object value);  }
@Test public void shouldConvertStringToTypeValue() { final ToTypeValue function = new ToTypeValue(); final String value = "value1"; final TypeValue result = function.apply(value); assertEquals(new TypeValue(null, value), result); }
@Test public void shouldConvertObjectToTypeValue() { final ToTypeValue function = new ToTypeValue(); final Object value = 1L; final TypeValue result = function.apply(value); assertEquals(new TypeValue(null, value.toString()), result); }
@Test public void shouldConvertNullToTypeValue() { final ToTypeValue function = new ToTypeValue(); final TypeValue result = function.apply(null); assertEquals(new TypeValue(null, null), result); }