### Question:
AccountInformationService { public List<Account> getAccounts(){ return accountCache.getUnchecked(gatekeeperAccountProperties.getServiceURI()); } @Autowired  AccountInformationService(GatekeeperAccountProperties gatekeeperAccountProperties, Backend2BackendService backend2BackendService); List<Account> getAccounts(); Account getAccountByAlias(String alias);  }### Answer:
@Test public void testGetAccounts(){ List<Account> accounts = accountInformationService.getAccounts(); Assert.assertEquals("hello1", accounts.get(0).getSdlc()); Assert.assertEquals("hello2", accounts.get(1).getSdlc()); Assert.assertEquals("hello1", accounts.get(2).getSdlc()); Assert.assertEquals("prod", accounts.get(3).getSdlc()); Assert.assertEquals("devtest", accounts.get(4).getSdlc()); Assert.assertEquals(Integer.valueOf(200), accounts.get(0).getGrouping()); Assert.assertEquals(Integer.valueOf(50), accounts.get(1).getGrouping()); Assert.assertEquals(Integer.valueOf(200), accounts.get(2).getGrouping()); Assert.assertEquals(Integer.valueOf(5), accounts.get(3).getGrouping()); Assert.assertEquals(Integer.valueOf(1), accounts.get(4).getGrouping()); }
@Test public void testGetAccountsNoOverride(){ gatekeeperAccountProperties.setSdlcOverrides(Collections.emptyMap()); List<Account> accounts = accountInformationService.getAccounts(); Assert.assertEquals("dev", accounts.get(0).getSdlc()); Assert.assertEquals("qa", accounts.get(1).getSdlc()); Assert.assertEquals("prod", accounts.get(2).getSdlc()); Assert.assertEquals("prod", accounts.get(3).getSdlc()); Assert.assertEquals("devtest", accounts.get(4).getSdlc()); }