### Question:
CRest { public static CRestBuilder oauth(String consumerKey, String consumerSecret, String accessToken, String accessTokenSecret){ return new CRestBuilder().oauth(consumerKey, consumerSecret, accessToken, accessTokenSecret); }  abstract T build(Class<T> interfaze); static CRest getInstance(); static CRest getInstance(String endpoint); static CRest getInstance(Map<String,String> placeholders); static CRest getOAuthInstance(String consumerKey, String consumerSecret, String accessToken, String accessTokenSecret); static CRest getOAuthInstance(String consumerKey, String consumerSecret, String accessToken, String accessTokenSecret, String sessionHandle, String accessTokenRefreshUrl); static CRest getBasicAuthInstance(String username, String password); static CRestBuilder endpoint(String endpoint); static CRestBuilder property(String name, Object value); static CRestBuilder placeholder(String placeholder, String value); static CRestBuilder placeholders(Map<String,String> placeholders); static CRestBuilder oauth(String consumerKey, String consumerSecret, String accessToken, String accessTokenSecret); static CRestBuilder oauth(String consumerKey, String consumerSecret, String accessToken, String accessTokenSecret, String sessionHandle, String accessTokenRefreshUrl); static CRestBuilder basicAuth(String username, String password);  }### Answer:
@Test public void oauthShouldReturnAOAuthReadyCRestBuilder(){ CRestBuilder expected = mock(CRestBuilder.class); when(builder.oauth("a","b","c","d")).thenReturn(expected); assertSame(expected, CRest.oauth("a","b","c","d")); verify(builder).oauth("a","b","c","d"); verifyNoMoreInteractions(builder); }
@Test public void oauthWithRefreshShouldReturnAOAuthReadyCRestBuilder(){ CRestBuilder expected = mock(CRestBuilder.class); when(builder.oauth("a","b","c","d", "e", "f")).thenReturn(expected); assertSame(expected, CRest.oauth("a","b","c","d", "e", "f")); verify(builder).oauth("a","b","c","d", "e", "f"); verifyNoMoreInteractions(builder); }