@Test
public void callThenReturnCitiesCount() throws Exception {

    final int[] result = {0};
    TestScheduler scheduler = new TestScheduler();
    Domain domain = new Domain(Maybe.just(new MockDatabaseGateway()), Maybe.empty());
    Callable<Maybe<Domain>> domainRetriever = new MockDomainRetriever(domain);
    new CountCitiesUseCase(domainRetriever, new CitiesQuery(scheduler))
            .call()
            .subscribe(value -> result[0] = value);
    scheduler.triggerActions();
    assertEquals(MockCitiesTable.CITIES_COUNT, result[0]);
}