/**
   * Tests getting a CertificateUser for success.
   *
   * @throws Exception if the test fails.
   */
  @Test
  public void testGetCertificateUserForSuccess() throws Exception {

    X509Certificate certificate =
        CertUtil.loadCertificate(
            getClass().getResourceAsStream(AuthenticationTestConstants.USERCERT_RCE_ENGINEER_PEM));
    User certificateUser = authService.createUser(certificate, validityInDays);

    assertTrue(certificateUser.isValid());
  }
 /**
  * Tests getting an LDAPUser for success.
  *
  * @throws Exception if the test fails.
  */
 @Test
 public void testGetLdapUserForSuccess() throws Exception {
   User ldapUser = authService.createUser("testUser", validityInDays);
   assertTrue(ldapUser.isValid());
 }