@Test
public void getAccountsCompletesAndEmitsAccounts() {

    stubPreferencesHelperGetAccessToken(TestDataFactory.makeAccessToken());
    List<Account> accounts = TestDataFactory.makeAccounts(5);
    MondroidService.AccountsResponse accountsResponse = new MondroidService.AccountsResponse();
    accountsResponse.accounts = accounts;
    stubMondoServiceGetAccounts(Single.just(accountsResponse));
    TestSubscriber<MondroidService.AccountsResponse> testSubscriber = new TestSubscriber<>();
    mDataManager.getAccounts().subscribe(testSubscriber);
    testSubscriber.assertCompleted();
    testSubscriber.assertValue(accountsResponse);
}