CorsConfig { public String origin() { return origins.isEmpty() ? "*" : origins.iterator().next(); } private  CorsConfig(final Builder builder); boolean isCorsSupportEnabled(); boolean isAnyOriginSupported(); String origin(); Set<String> origins(); boolean isNullOriginAllowed(); Set<String> exposedHeaders(); boolean isCredentialsAllowed(); long maxAge(); Set<HttpMethod> allowedRequestMethods(); Set<String> allowedRequestHeaders(); HttpHeaders preflightResponseHeaders(); boolean isShortCurcuit(); @Override String toString(); static Builder withAnyOrigin(); static Builder withOrigin(final String origin); static Builder withOrigins(final String... origins);  }
@Test public void origin() { final CorsConfig cors = withOrigin("http: assertThat(cors.origin(), is(equalTo("http: assertThat(cors.isAnyOriginSupported(), is(false)); }