use of com.google.api.ads.common.lib.client.RequestInfo in project googleads-java-lib by googleads.
the class RemoteCallLoggerDelegateTest method setUp.
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
loggerDelegate = new RemoteCallLoggerDelegate(requestInfoLogger, soapXmlLogger, prettyPrinter, RemoteCallType.SOAP);
RequestInfo requestInfo = new RequestInfo.Builder().withContext("clientCustomerId", "555-555-0000").withServiceName("test service").withMethodName("test method").withUrl("http://www.example.com").withPayload(requestXml).build();
ResponseInfo responseInfo = new ResponseInfo.Builder().withRequestId("abc123def456").withOperationsCount(1_234L).withResponseTimeMillis(543_210L).withPayload(responseXml).build();
remoteCallReturn = new RemoteCallReturn.Builder().withException(null).withRequestInfo(requestInfo).withResponseInfo(responseInfo).withReturnValue("some object").build();
when(prettyPrinter.prettyPrint(requestXml)).thenReturn(prettyRequest);
when(prettyPrinter.prettyPrint(responseXml)).thenReturn(prettyResponse);
}
Aggregations