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