private void testReadClob(boolean close) throws Exception {
    byte[] result = null;
    String data = "ZIP";

    when(clob.getAsciiStream()).thenReturn(new ByteArrayInputStream(data.getBytes()));

    if (close == true) {
      result = TypeHandlerUtils.readClob(clob);
    } else {
      result = TypeHandlerUtils.readClob(clob, false);
    }

    Assert.assertEquals(data, new String(result));
  }
 private void testConvertClobPrepare() throws SQLException, MjdbcException {
   // when(conn.createClob()).thenReturn(clob);
   when(MappingUtils.invokeFunction(conn, "createClob", new Class[] {}, new Object[] {}))
       .thenReturn(clob);
   when(clob.setAsciiStream(1)).thenReturn(output);
 }