@Test
  @InSequence(1)
  public void createNewUserTest() throws URISyntaxException {
    driver.get(authContextRoot.toURI().resolve(CONSOLE_PATH).toString());
    loginPage.waitForPage();
    loginPage.login(ADMIN_USERNAME, PASSWORD);
    if (passwordChangePage.isPagePresent()) {
      passwordChangePage.changePassword(PASSWORD);
    }
    keyCloakNavigation.waitForPage();
    keyCloakNavigation.users();

    User newUser = new User();
    newUser.setUsername(NEW_USER_USERNAME);
    newUser.setEnabled(true);

    usersPage.addUser(newUser);

    userPageNavBar.roleMappings();
    roleMappingsPage.assignRole("developer");
    userPageNavBar.credentials();
    credentialsPage.setPassword(NEW_USER_PASSWORD);
    modal.waitForDialog();
    modal.remove();
    dropdown.click("Sign Out");
    loginPage.waitForPage();
  }
  @Test
  @InSequence(2)
  public void adminCreateApplicationTest() {
    driver.get(contextRoot.toExternalForm());
    loginPage.waitForPage();
    loginPage.login(ADMIN_USERNAME, PASSWORD);
    if (passwordChangePage.isPagePresent()) {
      passwordChangePage.changePassword(PASSWORD);
    }
    navigation.goToApplications();
    pushAppsPage.waitForPage();

    navigation.goToApplications();
    // initially there shouldn't exist any push applications
    while (!pushAppsPage.getApplicationList().isEmpty()) {
      Application application = pushAppsPage.getApplicationList().get(0);
      application.remove();
      modal.waitForDialog();
      modal.confirmName(application.getName());
      modal.remove();
    }

    pushAppsPage.pressCreateButton();
    pushAppEditPage.registerNewPushApp(ADMIN_APPLICATION, "");

    header.logout();
  }
  @Test
  @InSequence(0)
  public void activateDeveloperTest() throws URISyntaxException {
    String ble = contextRoot.toExternalForm();
    driver.manage().timeouts().setScriptTimeout(15, TimeUnit.SECONDS);

    driver.get(authContextRoot.toURI().resolve(CONSOLE_PATH).toString());
    loginPage.waitForPage();
    loginPage.login(ADMIN_USERNAME, PASSWORD);
    if (passwordChangePage.isPagePresent()) {
      passwordChangePage.changePassword(PASSWORD);
    }
    keyCloakNavigation.waitForPage();
    keyCloakNavigation.users();
    usersPage.activateUser(DEVELOPER_USERNAME);

    dropdown.click("Sign Out");
    loginPage.waitForPage();
  }
  @Test
  @InSequence(7)
  public void newUserApplicationListTest() {
    driver.get(contextRoot.toExternalForm());
    loginPage.waitForPage();
    loginPage.login(NEW_USER_USERNAME, NEW_USER_PASSWORD);
    if (passwordChangePage.isPagePresent()) {
      passwordChangePage.changePassword(NEW_USER_PASSWORD);
    }

    navigation.goToApplications();
    pushAppsPage.waitForPage();

    assertEquals(1, pushAppsPage.countApplications());
    assertTrue(pushAppsPage.applicationExists(NEW_USER_APPLICATION, ""));
  }
  @Test
  @InSequence(6)
  public void adminApplicationListTest() {
    driver.get(contextRoot.toExternalForm());
    loginPage.login(ADMIN_USERNAME, PASSWORD);
    if (passwordChangePage.isPagePresent()) {
      passwordChangePage.changePassword(PASSWORD);
    }

    navigation.goToApplications();
    pushAppsPage.waitForPage();

    assertEquals(3, pushAppsPage.countApplications());
    assertTrue(pushAppsPage.applicationExists(ADMIN_APPLICATION, ""));
    assertTrue(pushAppsPage.applicationExists(DEVELOPER_APPLICATION, ""));
    assertTrue(pushAppsPage.applicationExists(NEW_USER_APPLICATION, ""));
    header.logout();
    loginPage.waitForPage();
  }
  @Test
  @InSequence(3)
  public void newUserCreateApplicationTest() {
    driver.get(contextRoot.toExternalForm());
    loginPage.waitForPage();
    loginPage.login(NEW_USER_USERNAME, NEW_USER_PASSWORD);
    if (passwordChangePage.isPagePresent()) {
      passwordChangePage.changePassword(NEW_USER_PASSWORD);
    }
    navigation.goToApplications();
    pushAppsPage.waitForPage();

    navigation.goToApplications();

    pushAppsPage.pressCreateButton();
    pushAppEditPage.registerNewPushApp(NEW_USER_APPLICATION, "");

    header.logout();
  }