### Question:
JDBCTypeMapping { @Nullable public Class<?> get(int sqlType, int total, int decimal) { if (NUMERIC_TYPES.contains(sqlType)) { Pair<Integer,Integer> key = Pair.of(total, decimal); if (numericTypes.containsKey(key)) { return numericTypes.get(key); } else if (sqlType == Types.NUMERIC || sqlType == Types.DECIMAL) { return getNumericClass(total, decimal); } } if (types.containsKey(sqlType)) { return types.get(sqlType); } else { return defaultTypes.get(sqlType); } }  void register(int sqlType, Class<?> javaType); void registerNumeric(int total, int decimal, Class<?> javaType); @Nullable Class<?> get(int sqlType, int total, int decimal); @Nullable Integer get(Class<?> clazz);  }### Answer:
@Test public void get() { assertEquals(Float.class, typeMapping.get(Types.FLOAT,0,0)); assertEquals(Float.class, typeMapping.get(Types.REAL,0,0)); }
@Test public void stringTypes() { assertEquals(String.class, typeMapping.get(Types.CHAR,0,0)); assertEquals(String.class, typeMapping.get(Types.NCHAR,0,0)); assertEquals(String.class, typeMapping.get(Types.CLOB,0,0)); assertEquals(String.class, typeMapping.get(Types.NCLOB,0,0)); assertEquals(String.class, typeMapping.get(Types.LONGVARCHAR,0,0)); assertEquals(String.class, typeMapping.get(Types.LONGNVARCHAR,0,0)); assertEquals(String.class, typeMapping.get(Types.SQLXML,0,0)); assertEquals(String.class, typeMapping.get(Types.VARCHAR,0,0)); assertEquals(String.class, typeMapping.get(Types.NVARCHAR,0,0)); }
@Test public void blobTypes() { assertEquals(Blob.class, typeMapping.get(Types.BLOB,0,0)); }
@Test public void bytesTypes() { assertEquals(byte[].class, typeMapping.get(Types.BINARY,0,0)); assertEquals(byte[].class, typeMapping.get(Types.VARBINARY,0,0)); assertEquals(byte[].class, typeMapping.get(Types.LONGVARBINARY,0,0)); }
@Test public void numericTypes() { assertEquals(typeMapping.get(Types.NUMERIC, 20, 0), BigInteger.class); assertEquals(typeMapping.get(Types.NUMERIC, 19, 0), BigInteger.class); assertEquals(typeMapping.get(Types.NUMERIC, 15, 0), Long.class); assertEquals(typeMapping.get(Types.NUMERIC, 6, 0), Integer.class); assertEquals(typeMapping.get(Types.NUMERIC, 5, 0), Integer.class); assertEquals(typeMapping.get(Types.NUMERIC, 4, 0), Short.class); assertEquals(typeMapping.get(Types.NUMERIC, 3, 0), Short.class); assertEquals(typeMapping.get(Types.NUMERIC, 2, 0), Byte.class); assertEquals(typeMapping.get(Types.NUMERIC, 1, 0), Byte.class); assertEquals(typeMapping.get(Types.NUMERIC, 0, 0), BigInteger.class); assertEquals(typeMapping.get(Types.NUMERIC, 17, 2), BigDecimal.class); assertEquals(typeMapping.get(Types.NUMERIC, 5, 2), BigDecimal.class); }