TracingEndpointCaller implements EndpointCaller { @Override public void doDeleteEntity(Map<String, String> requestProperties, URL url) throws ODataClientException { sendRequest(getRequestHeaders(requestProperties, 0, ATOM_XML, ATOM_XML), url, "", ODataRequest.Method.DELETE.name()); } TracingEndpointCaller(Properties properties); @Override String callEndpoint(Map<String, String> requestProperties, URL url); @Override InputStream getInputStream(Map<String, String> requestProperties, URL url); @Override String doPostEntity(Map<String, String> requestProperties, URL url, String body,
                               MediaType contentType, MediaType acceptType); @Override String doPutEntity(Map<String, String> requestProperties, URL url, String body, MediaType type); @Override void doDeleteEntity(Map<String, String> requestProperties, URL url);  }
@Test public void unauthorizedDeleteEntity() throws MalformedURLException, ODataClientException { thrown.expect(ODataClientNotAuthorized.class); caller.doDeleteEntity(emptyMap(), buildUrlToCall(HTTP_UNAUTHORIZED)); }
@Test public void forbiddenDeleteEntity() throws MalformedURLException, ODataClientException { thrown.expect(ODataClientHttpError.class); caller.doDeleteEntity(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN)); }
@Test public void timeoutDeleteEntity() throws MalformedURLException, ODataClientException { thrown.expect(ODataClientTimeout.class); caller.doDeleteEntity(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT)); }