CRest { public static CRestBuilder placeholder(String placeholder, String value){ return new CRestBuilder().placeholder(placeholder, value); }  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);  }
@Test public void placeholderShouldReturnACRestBuilderWithPlaceholderSet(){ CRestBuilder expected = mock(CRestBuilder.class); when(builder.placeholder("n","v")).thenReturn(expected); assertSame(expected, CRest.placeholder("n", "v")); verify(builder).placeholder("n", "v"); verifyNoMoreInteractions(builder); }