예제 #1
0
  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));
  }