@Test public void placeholdersShouldReturnACRestBuilderWithPlaceholdersSet(){ Map<String,String> ph = mock(Map.class); CRestBuilder expected = mock(CRestBuilder.class); when(builder.setPlaceholders(ph)).thenReturn(expected); assertSame(expected, CRest.placeholders(ph)); verify(builder).setPlaceholders(ph); verifyNoMoreInteractions(builder); }
public static CRestBuilder placeholders(Map<String,String> placeholders){ return new CRestBuilder().setPlaceholders(placeholders); }
CRest { public static CRestBuilder placeholders(Map<String,String> placeholders){ return new CRestBuilder().setPlaceholders(placeholders); } }
CRest { public static CRestBuilder placeholders(Map<String,String> placeholders){ return new CRestBuilder().setPlaceholders(placeholders); }  }
CRest { public static CRestBuilder placeholders(Map<String,String> placeholders){ return new CRestBuilder().setPlaceholders(placeholders); }  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); }
CRest { public static CRestBuilder placeholders(Map<String,String> placeholders){ return new CRestBuilder().setPlaceholders(placeholders); }  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);  }