@Test public void test_getAdministrators_exist() { List<UserDetails> users = new ArrayList<UserDetails>(); users.add(new User(USERNAME, OLD_PW, new ArrayList<>())); Mockito.when(adminDetailsService.getAllAdmins()).thenReturn(users); List<UserDetails> retrievedUsers = adminManagerToTest.getAdministrators(); Assert.assertArrayEquals(users.toArray(), retrievedUsers.toArray()); }
@Override public List<UserDetails> getAdministrators() { return adminDetailsService.getAllAdmins(); }
AdminUserManager implements IAdminUserManager { @Override public List<UserDetails> getAdministrators() { return adminDetailsService.getAllAdmins(); } }
AdminUserManager implements IAdminUserManager { @Override public List<UserDetails> getAdministrators() { return adminDetailsService.getAllAdmins(); }  }
AdminUserManager implements IAdminUserManager { @Override public List<UserDetails> getAdministrators() { return adminDetailsService.getAllAdmins(); }  @Override List<UserDetails> getAdministrators(); @Override boolean isPasswordValid(String username, String password); @Override boolean updatePassword(String username, String oldPassword, String newPassword); }
AdminUserManager implements IAdminUserManager { @Override public List<UserDetails> getAdministrators() { return adminDetailsService.getAllAdmins(); }  @Override List<UserDetails> getAdministrators(); @Override boolean isPasswordValid(String username, String password); @Override boolean updatePassword(String username, String oldPassword, String newPassword);  }