@Test
  public void testIsValidNeg() throws Exception {
    miniHiveKdc.loginUser(MiniHiveKdc.HIVE_TEST_SUPER_USER);
    hs2Conn = DriverManager.getConnection(miniHS2.getJdbcURL());
    hs2Conn.close();
    assertFalse(hs2Conn.isValid(1000));
  }
Negative test isValid() method
@throws Exception
itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithMiniKdc.java