ClobToStringMapper implements TypeMapper<Clob, String> { @Override public String toJavaType(Column column, Class<?> entityType, Clob value) { if (value == null) { return null; } else try { if (value.length() < Integer.MAX_VALUE) { return value.getSubString(1, (int) value.length()); } else { throw new SpeedmentTypeMapperException( "The provided Clob contains too many characters >" + Integer.MAX_VALUE ); } } catch (final SQLException sqle) { throw new SpeedmentTypeMapperException("Unable to convert Clob to String.", sqle); } }  @Override String getLabel(); @Override Type getJavaType(Column column); @Override String toJavaType(Column column, Class<?> entityType, Clob value); @Override Clob toDatabaseType(String value);  }
@Test void toJavaType() { assertEquals(String.class,mapper.getJavaType(null)); }