@Test
public void shouldUseDefaults() throws Exception {

    FormOAuthInterface expectedOAuthInterface = mock(FormOAuthInterface.class);
    when(crest.build(FormOAuthInterface.class)).thenReturn(expectedOAuthInterface);
    OAuthApiV1 mockBuilderResult = mock(OAuthApiV1.class);
    whenNew(OAuthApiV1.class)
            .withArguments(MethodType.POST, ENDPOINT, "", "", "", expectedOAuthInterface, token, DefaultVariantProvider.INSTANCE)
            .thenReturn(mockBuilderResult);
    OAuthApiV1 actual = toTest.build();
    assertEquals(mockBuilderResult, actual);
    verify(mockCRestBuilder).placeholder("oauth.end-point", ENDPOINT);
    verify(mockCRestBuilder).placeholder("oauth.access-token.path", "");
    verify(mockCRestBuilder).placeholder("oauth.request-token.path", "");
    verify(mockCRestBuilder).placeholder("oauth.refresh-access-token.path", "");
    verify(mockCRestBuilder).setHttpChannelFactory(any(HttpURLConnectionHttpChannelFactory.class));
}