@Test
  public void testGetBooleanStringTrue() throws SQLException {
    FieldSchema fieldSchema = new FieldSchema();
    fieldSchema.setType("varchar(16)");

    List<FieldSchema> fieldSchemas = Arrays.asList(fieldSchema);
    TableSchema schema = new TableSchema(fieldSchemas);

    HiveBaseResultSet resultSet = Mockito.mock(HiveBaseResultSet.class);
    resultSet.row = new Object[] {"1"};

    when(resultSet.getSchema()).thenReturn(schema);
    when(resultSet.getBoolean(1)).thenCallRealMethod();
    when(resultSet.getObject(1)).thenCallRealMethod();
    when(resultSet.wasNull()).thenCallRealMethod();

    Assert.assertEquals(true, resultSet.getBoolean(1));
    Assert.assertFalse(resultSet.wasNull());
  }
If the designated column has a datatype of CHAR or VARCHAR and contains a
"1" a value of true is returned.

@see ResultSet#getBoolean(int)
jdbc/src/test/org/apache/hive/jdbc/TestHiveBaseResultSet.java