use of com.google.cloud.ServiceOptions in project google-cloud-java by GoogleCloudPlatform.
the class HttpTransportOptionsTest method testHeader.
@Test
public void testHeader() {
String expectedHeaderPattern = "^gl-java/.* gccl/0.0.0";
final ServiceOptions mockOptions = EasyMock.createMock(ServiceOptions.class);
EasyMock.expect(mockOptions.getLibraryVersion()).andReturn("0.0.0");
EasyMock.replay(mockOptions);
assertTrue(Pattern.compile(expectedHeaderPattern).matcher(OPTIONS.getXGoogApiClientHeader(mockOptions)).find());
}
Aggregations