BigIntegerType implements UserType { @Override public Object assemble(final Serializable cached, final Object owner) throws HibernateException { byte[] radixBigint = (byte[]) cached; return new BigInteger(radixBigint); }  @Override int[] sqlTypes(); @Override Class returnedClass(); @Override boolean equals(final Object x,
                          final Object y); @Override int hashCode(final Object x); @Override Object nullSafeGet(final ResultSet rs,
                              final String[] names,
                              final SharedSessionContractImplementor session,
                              final Object owner); @Override void nullSafeSet(final PreparedStatement st,
                            final Object value,
                            final int index,
                            final SharedSessionContractImplementor session); @Override Object deepCopy(final Object value); @Override boolean isMutable(); @Override Serializable disassemble(final Object value); @Override Object assemble(final Serializable cached,
                           final Object owner); @Override Object replace(final Object original,
                          final Object target,
                          final Object owner);  }
@Test public void assemble() { BigIntegerType type = new BigIntegerType(); BigInteger one = IdUtil.next(); BigInteger result = (BigInteger) type.assemble(one.toByteArray(), null); assertTrue(one.equals(result)); }