use of fixtures.header.models.HeaderResponseProtectedKeyHeaders in project autorest.java by Azure.
the class HeaderOperationsTests method responseProtectedKey.
@Test
public void responseProtectedKey() throws Exception {
lock = new CountDownLatch(1);
client.headers().responseProtectedKeyWithServiceResponseAsync().subscribe(new Action1<ServiceResponseWithHeaders<Void, HeaderResponseProtectedKeyHeaders>>() {
@Override
public void call(ServiceResponseWithHeaders<Void, HeaderResponseProtectedKeyHeaders> response) {
Headers headers = response.response().headers();
if (headers.get("Content-Type") != null) {
Assert.assertTrue(headers.get("Content-Type").contains("text/html"));
lock.countDown();
}
}
}, new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
fail();
}
});
Assert.assertTrue(lock.await(1000, TimeUnit.MILLISECONDS));
}
Aggregations