@@ -0,0 +1,1449 @@
+package ru.stqa.pft.mantis.tests;%0A%0Aimport org.testng.annotations.AfterMethod;%0Aimport org.testng.annotations.BeforeMethod;%0Aimport org.testng.annotations.Test;%0Aimport ru.stqa.pft.mantis.model.UserData;%0Aimport ru.stqa.pft.mantis.model.Users;%0A%0Aimport javax.mail.MessagingException;%0Aimport java.io.IOException;%0A%0Aimport static org.testng.Assert.assertTrue;%0A%0Apublic class ChangePasswordTest extends TestBase %7B%0A%0A    @BeforeMethod%0A    public void ensurePreconditions() throws IOException, MessagingException %7B%0A        app.mail().start();%0A        if (app.db().users().size() %3C= 1) %7B%0A            long now = System.currentTimeMillis();%0A            app.user().registerNewUser(new UserData().withUsername(String.format(%22user%25s%22, now))%0A                    .withPassword(%22password%22).withEmail(String.format(%22user%25s@localhost.localdomain%22, now)));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void testChangePassword() throws IOException, MessagingException %7B%0A        Users allUsers = app.db().users();%0A        String newPassword = %221234%22;%0A        for (UserData user : allUsers)%0A            if (user.getId() %3E 1) %7B%0A                app.user().uiLogin(%22administrator%22, %22root%22);%0A                app.user().resetPassword(user, newPassword);%0A                assertTrue(app.newSession().login(user.getUsername(), newPassword));%0A                break;%0A            %7D%0A    %7D%0A%0A    @AfterMethod(alwaysRun = true)%0A    public void stopMailServer() %7B%0A        app.mail().stop();%0A    %7D%0A%7D%0A%0A%0A

Change password test implemented