Search in sources :

Example 16 with InBoundHeaders

use of com.sun.jersey.core.header.InBoundHeaders in project ORCID-Source by ORCID.

the class AnalyticsProcessTest method getRequest.

private ContainerRequest getRequest() {
    InBoundHeaders headers = new InBoundHeaders();
    headers.add(HttpHeaders.CONTENT_TYPE, "application/xml");
    headers.add(HttpHeaders.USER_AGENT, "blah");
    return new ContainerRequest(new WebApplicationImpl(), "POST", URI.create("https://localhost:8443/orcid-api-web/"), URI.create("https://localhost:8443/orcid-api-web/v2.0/1234-4321-1234-4321/works"), headers, null);
}
Also used : InBoundHeaders(com.sun.jersey.core.header.InBoundHeaders) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl) ContainerRequest(com.sun.jersey.spi.container.ContainerRequest)

Aggregations

InBoundHeaders (com.sun.jersey.core.header.InBoundHeaders)16 ContainerRequest (com.sun.jersey.spi.container.ContainerRequest)16 Test (org.junit.Test)13 WebApplication (com.sun.jersey.spi.container.WebApplication)10 ByteArrayInputStream (java.io.ByteArrayInputStream)10 URI (java.net.URI)9 OrcidBadRequestException (org.orcid.core.exception.OrcidBadRequestException)9 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)5 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)4 XForwardFilter (org.neo4j.server.web.XForwardFilter)4 WebApplicationImpl (com.sun.jersey.server.impl.application.WebApplicationImpl)2 Before (org.junit.Before)1