@After
  public void tearDown() throws Exception {
    for (Certificate certificate : certificatesToRemove) {
      internalCertificateStoreSession.removeCertificate(certificate);
    }
    for (Certificate certificate :
        internalCertificateStoreSession.findCertificatesByIssuer("CN=" + CA_NAME)) {
      internalCertificateStoreSession.removeCertificate(certificate);
    }

    endEntityManagementSession.deleteUser(admin, USERNAME);
    log.debug("Removed user: "******"Removed service:" + CERTIFICATE_EXPIRATION_SERVICE);
    assertNull(
        "ServiceData object with id 4711 was not removed properly.",
        serviceDataSession.findById(4711));
  }
 @Before
 public void setUp() throws Exception {
   certificatesToRemove = new ArrayList<Certificate>();
   endEntityManagementSession.addUser(
       admin,
       USERNAME,
       PASSWORD,
       "C=SE,O=AnaTom,CN=" + USERNAME,
       null,
       null,
       false,
       SecConst.EMPTY_ENDENTITYPROFILE,
       CertificateProfileConstants.CERTPROFILE_FIXED_ENDUSER,
       new EndEntityType(EndEntityTypes.ENDUSER),
       SecConst.TOKEN_SOFT_PEM,
       0,
       caid);
 }