Search in sources :

Example 16 with MapPropertiesDelegate

use of org.glassfish.jersey.internal.MapPropertiesDelegate in project jersey by jersey.

the class ClientRequestTest method mockThrowing.

private ClientRequest mockThrowing(Exception exception) throws IOException {
    JerseyClient client = new JerseyClientBuilder().build();
    final ClientRequest request = new ClientRequest(URI.create("http://example.org"), client.getConfiguration(), new MapPropertiesDelegate());
    Mockito.doThrow(exception).when(workers).writeTo(any(), same(entityType.getRawType()), same(entityType.getType()), Mockito.<Annotation[]>any(), Mockito.<MediaType>any(), Mockito.<MultivaluedMap<String, Object>>any(), Mockito.<PropertiesDelegate>any(), Mockito.<OutputStream>any(), Mockito.<Iterable<WriterInterceptor>>any());
    return request;
}
Also used : MapPropertiesDelegate(org.glassfish.jersey.internal.MapPropertiesDelegate) WriterInterceptor(javax.ws.rs.ext.WriterInterceptor) Annotation(java.lang.annotation.Annotation)

Aggregations

MapPropertiesDelegate (org.glassfish.jersey.internal.MapPropertiesDelegate)16 Test (org.junit.Test)9 ContainerRequest (org.glassfish.jersey.server.ContainerRequest)6 URI (java.net.URI)4 IOException (java.io.IOException)3 ContainerResponse (org.glassfish.jersey.server.ContainerResponse)3 ContainerResponseWriter (org.glassfish.jersey.server.spi.ContainerResponseWriter)3 URISyntaxException (java.net.URISyntaxException)2 SimpleDateFormat (java.text.SimpleDateFormat)2 Date (java.util.Date)2 EntityTag (javax.ws.rs.core.EntityTag)2 ApplicationHandler (org.glassfish.jersey.server.ApplicationHandler)2 ContainerException (org.glassfish.jersey.server.ContainerException)2 HttpsExchange (com.sun.net.httpserver.HttpsExchange)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 OutputStream (java.io.OutputStream)1 Annotation (java.lang.annotation.Annotation)1 Principal (java.security.Principal)1 ServletException (javax.servlet.ServletException)1