@Test
void login() {

    final ZonkyOAuthApi api = mock(ZonkyOAuthApi.class);
    when(api.login(anyString(), anyString(), anyString())).thenReturn(mock(ZonkyApiTokenImpl.class));
    final Api<ZonkyOAuthApi> wrapper = new Api<>(api);
    final OAuth oauth = new OAuth(wrapper);
    final ZonkyApiToken token = oauth.login(PASSWORD.toCharArray());
    assertThat(token).isNotNull();
    verify(api, times(1))
        .login(eq(PASSWORD), any(), eq("authorization_code"));
}