use of com.google.spanner.admin.instance.v1.DeleteInstanceRequest in project java-spanner by googleapis.
the class InstanceAdminClientTest method deleteInstanceTest2.
@Test
public void deleteInstanceTest2() throws Exception {
Empty expectedResponse = Empty.newBuilder().build();
mockInstanceAdmin.addResponse(expectedResponse);
String name = "name3373707";
client.deleteInstance(name);
List<AbstractMessage> actualRequests = mockInstanceAdmin.getRequests();
Assert.assertEquals(1, actualRequests.size());
DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0));
Assert.assertEquals(name, actualRequest.getName());
Assert.assertTrue(channelProvider.isHeaderSent(ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}
Aggregations