@Test
public void accountsToTradeTest() {

	BaseTradingConfig baseTradingConfig = mock(BaseTradingConfig.class);
	when(baseTradingConfig.getMinReserveRatio()).thenReturn(0.2);
	when(baseTradingConfig.getMinAmountRequired()).thenReturn(200.00);
	AccountDataProvider<Long> accountDataProvider = mock(AccountDataProvider.class);
	AccountInfoService<Long, String> accInfoService = new AccountInfoService<Long, String>(accountDataProvider,
			null, baseTradingConfig, null);
	List<Account<Long>> accounts = createAccounts();
	when(accountDataProvider.getLatestAccountInfo()).thenReturn(accounts);
	Collection<Long> eligibleAccounts = accInfoService.findAccountsToTrade();
	assertEquals(1, eligibleAccounts.size());
	long eligibleAccount = eligibleAccounts.iterator().next();
	assertEquals(1001L, eligibleAccount);
}