ResultSetMetaData rsmd = createMock(ResultSetMetaData.class);
expect(rsmd.getColumnType(anyInt())).andReturn(jdbcType).atLeastOnce();
expect(rs.getMetaData()).andReturn(rsmd).atLeastOnce();
replay(rsmd, rs);
DigestContentHolder holder = new LobTypeHandler().getNullableResult(rs, 1);
verify(rsmd, rs);
// SQL NULLs are rendered as empty byte arrays for easier handling.
Object content = holder.getContent();
assertTrue(content.getClass().toString(),
content instanceof InputStreamFactory);
assertEquals(-1, ((InputStreamFactory) content).getInputStream().read());
}