@Test
void purchase() {

    final ControlApi control = mock(ControlApi.class);
    final Api<ControlApi> ca = mockApi(control);
    final Zonky z = mockZonkyControl(ca);
    final Participation p = mock(ParticipationImpl.class);
    when(p.getRemainingPrincipal()).thenReturn(Money.from(10));
    when(p.getId()).thenReturn(1L);
    assertThat(z.purchase(p)).isEqualTo(PurchaseResult.success());
}