use of com.google.logging.v2.WriteLogEntriesResponse in project google-cloud-java by GoogleCloudPlatform.
the class LoggingImplTest method testWriteLogEntries.
@Test
public void testWriteLogEntries() {
WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder().addAllEntries(Iterables.transform(ImmutableList.of(LOG_ENTRY1, LOG_ENTRY2), LogEntry.toPbFunction(PROJECT))).build();
WriteLogEntriesResponse response = WriteLogEntriesResponse.newBuilder().build();
EasyMock.expect(loggingRpcMock.write(request)).andReturn(ApiFutures.immediateFuture(response));
EasyMock.replay(rpcFactoryMock, loggingRpcMock);
logging = options.getService();
logging.write(ImmutableList.of(LOG_ENTRY1, LOG_ENTRY2));
}
Aggregations