use of com.google.example.library.v1.MergeShelvesRequest in project gapic-generator-java by googleapis.
the class LibraryServiceClientTest method mergeShelvesTest4.
@Test
public void mergeShelvesTest4() throws Exception {
Shelf expectedResponse = Shelf.newBuilder().setName(ShelfName.of("[SHELF_ID]").toString()).setTheme("theme110327241").build();
mockLibraryService.addResponse(expectedResponse);
String name = "name3373707";
String otherShelf = "otherShelf-193668870";
Shelf actualResponse = client.mergeShelves(name, otherShelf);
Assert.assertEquals(expectedResponse, actualResponse);
List<AbstractMessage> actualRequests = mockLibraryService.getRequests();
Assert.assertEquals(1, actualRequests.size());
MergeShelvesRequest actualRequest = ((MergeShelvesRequest) actualRequests.get(0));
Assert.assertEquals(name, actualRequest.getName());
Assert.assertEquals(otherShelf, actualRequest.getOtherShelf());
Assert.assertTrue(channelProvider.isHeaderSent(ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}
Aggregations