### Question:
GPDBWritable implements Writable { public static String getTypeName(int oid) { DataType type = DataType.get(oid); if (type == DataType.UNSUPPORTED_TYPE) return DataType.TEXT.name(); return type.name(); } GPDBWritable();  GPDBWritable(int[] columnType);  GPDBWritable(byte[] data); int[] getColType(); @Override void readFields(DataInput in); @Override void write(DataOutput out); void setLong(int colIdx, Long val); void setBoolean(int colIdx, Boolean val); void setBytes(int colIdx, byte[] val); void setString(int colIdx, String val); void setFloat(int colIdx, Float val); void setDouble(int colIdx, Double val); void setInt(int colIdx, Integer val); void setShort(int colIdx, Short val); void setObject(int colIdx, Object val); Long getLong(int colIdx); Boolean getBoolean(int colIdx); byte[] getBytes(int colIdx); String getString(int colIdx); Float getFloat(int colIdx); Double getDouble(int colIdx); Integer getInt(int colIdx); Short getShort(int colIdx); Object getObject(int colIdx); void setError(boolean errorVal); @Override String toString(); static String getTypeName(int oid); boolean isEmpty();  }### Answer:
@Test public void testGetType() { String typeName = GPDBWritable.getTypeName(-1); assertEquals(typeName, DataType.TEXT.name()); typeName = GPDBWritable.getTypeName(-7777); assertEquals(typeName, DataType.TEXT.name()); typeName = GPDBWritable.getTypeName(DataType.BOOLEAN.getOID()); assertEquals(typeName, DataType.BOOLEAN.name()); typeName = GPDBWritable.getTypeName(DataType.BYTEA.getOID()); assertEquals(typeName, DataType.BYTEA.name()); typeName = GPDBWritable.getTypeName(DataType.BIGINT.getOID()); assertEquals(typeName, DataType.BIGINT.name()); typeName = GPDBWritable.getTypeName(DataType.SMALLINT.getOID()); assertEquals(typeName, DataType.SMALLINT.name()); typeName = GPDBWritable.getTypeName(DataType.INTEGER.getOID()); assertEquals(typeName, DataType.INTEGER.name()); typeName = GPDBWritable.getTypeName(DataType.TEXT.getOID()); assertEquals(typeName, DataType.TEXT.name()); typeName = GPDBWritable.getTypeName(DataType.REAL.getOID()); assertEquals(typeName, DataType.REAL.name()); typeName = GPDBWritable.getTypeName(DataType.FLOAT8.getOID()); assertEquals(typeName, DataType.FLOAT8.name()); typeName = GPDBWritable.getTypeName(DataType.BPCHAR.getOID()); assertEquals(typeName, DataType.BPCHAR.name()); typeName = GPDBWritable.getTypeName(DataType.VARCHAR.getOID()); assertEquals(typeName, DataType.VARCHAR.name()); typeName = GPDBWritable.getTypeName(DataType.DATE.getOID()); assertEquals(typeName, DataType.DATE.name()); typeName = GPDBWritable.getTypeName(DataType.TIME.getOID()); assertEquals(typeName, DataType.TIME.name()); typeName = GPDBWritable.getTypeName(DataType.TIMESTAMP.getOID()); assertEquals(typeName, DataType.TIMESTAMP.name()); typeName = GPDBWritable.getTypeName(DataType.NUMERIC.getOID()); assertEquals(typeName, DataType.NUMERIC.name()); }