[Tests] Fix RestClientTests
This commit is contained in:
parent
9da8531f60
commit
02c919f0b0
|
@ -56,12 +56,12 @@ public class RestClientTests extends RestClientTestCase {
|
||||||
public void testPerformAsyncWithNullHeaders() throws Exception {
|
public void testPerformAsyncWithNullHeaders() throws Exception {
|
||||||
RestClient.SyncResponseListener listener = new RestClient.SyncResponseListener(10000);
|
RestClient.SyncResponseListener listener = new RestClient.SyncResponseListener(10000);
|
||||||
try (RestClient restClient = createRestClient()) {
|
try (RestClient restClient = createRestClient()) {
|
||||||
restClient.performRequestAsync("GET", randomAsciiOfLength(5), listener, null);
|
restClient.performRequestAsync("GET", randomAsciiOfLength(5), listener, (Header) null);
|
||||||
listener.get();
|
listener.get();
|
||||||
|
|
||||||
fail("should have failed because of null headers");
|
fail("should have failed because of null headers");
|
||||||
} catch (NullPointerException exception) {
|
} catch (NullPointerException exception) {
|
||||||
assertEquals("request headers must not be null", exception.getMessage());
|
assertEquals("request header must not be null", exception.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue