@Test
void refresh() {

    final String originalTokenId = UUID.randomUUID()
        .toString();
    final ZonkyApiToken originToken = new ZonkyApiTokenImpl(UUID.randomUUID()
        .toString(), originalTokenId,
            OffsetDateTime.now());
    final ZonkyApiTokenImpl resultToken = mock(ZonkyApiTokenImpl.class);
    final ZonkyOAuthApi api = mock(ZonkyOAuthApi.class);
    when(api.refresh(eq(originalTokenId), anyString())).thenReturn(resultToken);
    final Api<ZonkyOAuthApi> wrapper = new Api<>(api);
    final OAuth oauth = new OAuth(wrapper);
    final ZonkyApiToken returnedToken = oauth.refresh(originToken);
    assertThat(returnedToken).isEqualTo(resultToken);
}