### Question:
InetAddressUserType implements UserType { public Object nullSafeGet(final ResultSet rs, final String[] names, final Object owner) throws HibernateException, SQLException { return InetAddressUtils.getInetAddress((String)Hibernate.STRING.nullSafeGet(rs, names[0])); } InetAddressUserType(); Object assemble(final Serializable cached, final Object owner); Object deepCopy(final Object value); Serializable disassemble(final Object value); boolean equals(final Object x, final Object y); int hashCode(final Object x); boolean isMutable(); Object nullSafeGet(final ResultSet rs, final String[] names, final Object owner); void nullSafeSet(final PreparedStatement st, final Object value, final int index); Object replace(final Object original, final Object target, final Object owner); Class<InetAddress> returnedClass(); int[] sqlTypes();  }### Answer:
@Test public void testInetAddressType() throws Exception { ResultSet rs = EasyMock.createMock(ResultSet.class); EasyMock.expect(rs.getString("ipAddr")).andReturn(null); EasyMock.replay(rs); final InetAddressUserType userType = new InetAddressUserType(); final Object result = userType.nullSafeGet(rs, new String[]{"ipAddr"}, null); EasyMock.verify(rs); assertNull(result); }