Hi Unnati, you can use TestNG to write test script for your requirements. Following test script fulfills your requirements:
@test
public void testAdminUserCanUpdateUserAccountPassword() {
// create users
User userAdmin = new User(UserRole.ADMIN, username, password);
User user = new User(UserRole.VIEWER, user_username, user_password);
// use Admin user to update another user password
String message = userAdmin.updatePassword(user, user_new_password);
// verify password changed
Assert.assertEquals(message, "Password changed successfully");
Assert.assertEquals(user.getPassword(), user_new_password);
}