use of com.google.logging.v2.CreateViewRequest in project gapic-generator-java by googleapis.
the class ConfigClientTest method createViewExceptionTest.
@Test
public void createViewExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockConfigServiceV2.addException(exception);
try {
CreateViewRequest request = CreateViewRequest.newBuilder().setParent("parent-995424086").setViewId("viewId-816632160").setView(LogView.newBuilder().build()).build();
client.createView(request);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
}
}
Aggregations