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