ToLongConverter implements ConverterWrapper<Long, Object> { @Override public Long convertToAttribute(Object value) { assert value != null; assert supportsAxiomValueType(value.getClass()); return ((Number) value).longValue(); }  @Override Object convertToAxiomValue(Long value); @Override Long convertToAttribute(Object value); @Override boolean supportsAxiomValueType(Class<?> type);  }
@Test public void toAttributeSupportsWideningIntegerConversion() { assertEquals(Long.valueOf(11), converter.convertToAttribute(Byte.valueOf((byte) 11))); assertEquals(Long.valueOf(117), converter.convertToAttribute(Short.valueOf((short) 117))); assertEquals(Long.valueOf(117), converter.convertToAttribute(117)); }
@Test public void toAttributeSupportsIdentityConversion() { assertEquals(Long.valueOf(117), converter.convertToAttribute(117L)); }