@Test
public void getHistory_oneNext() throws ParseException {

    BPIService service = mock(BPIService.class);
    when(service.getHistory()).thenReturn(Observable.from(new HistoryDto[] {
            newHistory(3)
    }));
    BPIServiceClient client = new BPIServiceClient(service);
    TestSubscriber<List<BPI>> subscriber = new TestSubscriber<>();
    client.getHistory().subscribe(subscriber);
    List<List<BPI>> expectedResults = new ArrayList<>();
    expectedResults.add(Lists.newArrayList(
            new BPI(newDate(3), 3f, 1f/2f),
            new BPI(newDate(2), 2f, 1f)
    ));
    subscriber.assertReceivedOnNext(expectedResults);
    subscriber.assertTerminalEvent();
    subscriber.assertNoErrors();
}