URLConnectionRequestPropertiesBuilder { public URLConnectionRequestPropertiesBuilder withAccessToken(String accessToken) { requestProperties.put("Authorization", "Bearer " + accessToken); return this; }  URLConnectionRequestPropertiesBuilder withCookie(String cookieName, String cookieValue); URLConnectionRequestPropertiesBuilder withAccessToken(String accessToken); Map<String, String> build();  }
@Test public void testWithAccessToken() { URLConnectionRequestPropertiesBuilder builder = new URLConnectionRequestPropertiesBuilder(); Map<String, String> result = builder.withAccessToken("this_is_access_token").build(); assertNotNull(result); assertFalse(result.isEmpty()); assertThat(result.size(), is(1)); assertTrue(result.containsKey("Authorization")); assertThat(result.get("Authorization"), is("Bearer this_is_access_token")); }