### Question:
DatabaseConnectionService { public List<DbUser> getUsersForDb(GatekeeperRDSInstance db, AWSEnvironment awsEnvironment) throws Exception { Account account = accountInformationService.getAccountByAlias(awsEnvironment.getAccount()); return databaseConnectionFactory.getConnection(db.getEngine()).getUsers( new RdsQuery() .withAccount(account.getAlias()) .withAccountId(account.getAccountId()) .withRegion(awsEnvironment.getRegion()) .withSdlc(awsEnvironment.getSdlc()) .withAddress(getAddress(db.getEndpoint(), db.getDbName())) .withDbInstanceName(db.getName())); } @Autowired  DatabaseConnectionService(DatabaseConnectionFactory databaseConnectionFactory, AccountInformationService accountInformationService); Boolean grantAccess(AWSRdsDatabase db, AWSEnvironment awsEnvironment, String user, RoleType roleType, String password, Integer timeDays); Boolean revokeAccess(AWSRdsDatabase db, AWSEnvironment awsEnvironment, RoleType roleType, String user); @PreAuthorize("@gatekeeperRoleService.isApprover()") List<String> forceRevokeAccessUsersOnDatabase(GatekeeperRDSInstance db, AWSEnvironment awsEnvironment, List<DbUser> users ); Map<RoleType, List<String>> getAvailableSchemasForDb(GatekeeperRDSInstance database, AWSEnvironment awsEnvironment); Map<RoleType, List<String>> getAvailableSchemasForDb(AWSRdsDatabase database, AWSEnvironment awsEnvironment); String checkDb(DBInstance db, AWSEnvironment awsEnvironment); String checkDb(DBCluster db, AWSEnvironment awsEnvironment); List<DbUser> getUsersForDb(GatekeeperRDSInstance db, AWSEnvironment awsEnvironment); List<String> getAvailableRolesForDb(DBInstance db, AWSEnvironment awsEnvironment); List<String> getAvailableRolesForDb(DBCluster db, AWSEnvironment awsEnvironment); List<String> checkUsersAndDbs(List<UserRole> roles, List<User> users, AWSRdsDatabase db, AWSEnvironment awsEnvironment);  }### Answer:
@Test public void testGetUsersForDb() throws Exception { ArgumentCaptor<RdsQuery> argumentCaptor = ArgumentCaptor.forClass(RdsQuery.class); List<DbUser> result = databaseConnectionService.getUsersForDb(supportedGatekeeperRDSInstance, environment); Mockito.verify(mockDBConnection).getUsers(argumentCaptor.capture()); RdsQuery actualCall = argumentCaptor.getValue(); Assert.assertEquals(expectedRequest, actualCall); Assert.assertEquals(2, result.size()); }