@Test public void testWithCustomHeader() { String customHeaderName = HttpHeaders.ACCEPT; String customHeaderValue = "application/json"; Collection<Executable> capturedAssertions = new LinkedList<>(); WebTarget webTarget = ClientBuilder.newClient() .register((ClientRequestFilter) clientRequestContext -> { capturedAssertions.add(() -> assertEquals(APPLICATION_JSON_SCIM, clientRequestContext.getHeaderString(CONTENT_TYPE))); capturedAssertions.add(() -> assertEquals(DEFAULT_URL, clientRequestContext.getUri().toString())); capturedAssertions.add(() -> assertEquals(customHeaderValue, clientRequestContext.getHeaderString(customHeaderName))); }) .target(DEFAULT_URL); SCIMRequest scimRequest = SCIMRequest.newBuilder().addHeader(customHeaderName, customHeaderValue).build(); processAssertionsOnAllHttpMethods(scimRequest, webTarget, capturedAssertions); }
public static Builder newBuilder() { return new Builder(); }
SCIMRequest { public static Builder newBuilder() { return new Builder(); } }
SCIMRequest { public static Builder newBuilder() { return new Builder(); } private  SCIMRequest(Builder builder); }
SCIMRequest { public static Builder newBuilder() { return new Builder(); } private  SCIMRequest(Builder builder); static Builder newBuilder(); }
SCIMRequest { public static Builder newBuilder() { return new Builder(); } private  SCIMRequest(Builder builder); static Builder newBuilder();  }