private void testOnePasswordAuthWithJWT(HiveAuthConstants.AuthTypes type) throws Exception {
    AuthType authType = new AuthType("JWT," + type.getAuthName(), HiveServer2TransportMode.http);
    Assert.assertTrue(authType.isEnabled(HiveAuthConstants.AuthTypes.JWT));
    Assert.assertTrue(authType.isEnabled(type));

    Set<HiveAuthConstants.AuthTypes> disabledAuthTypes = Arrays.stream(HiveAuthConstants.AuthTypes.values())
        .collect(Collectors.toSet());
    disabledAuthTypes.remove(HiveAuthConstants.AuthTypes.JWT);
    disabledAuthTypes.remove(type);
    for (HiveAuthConstants.AuthTypes disabledType : disabledAuthTypes) {
      Assert.assertFalse(authType.isEnabled(disabledType));
    }
    Assert.assertEquals(type.getAuthName(), authType.getPasswordBasedAuthStr());
    verify("JWT," + type.getAuthName(), HiveServer2TransportMode.binary, true);
    verify("JWT," + type.getAuthName(), HiveServer2TransportMode.all, true);
  }
Tests to test if AuthType can parse allowed values and reject disallowed combinations.
service/src/test/org/apache/hive/service/auth/TestAuthType.java