From ceca5f7692931ea536eaef006d3a05a815db6d42 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 1 Jan 2026 14:40:21 -0500 Subject: [PATCH 1/8] chore: migrate tests to JUnit 5 --- google-cloud-logging/pom.xml | 14 +- .../logging/AutoPopulateMetadataTests.java | 33 +- .../google/cloud/logging/BaseSystemTest.java | 15 +- .../cloud/logging/ContextHandlerTest.java | 35 +- .../com/google/cloud/logging/ContextTest.java | 25 +- .../google/cloud/logging/ExclusionTest.java | 21 +- .../google/cloud/logging/HttpRequestTest.java | 23 +- .../cloud/logging/InstrumentationTest.java | 35 +- .../cloud/logging/InvalidContextTest.java | 23 +- .../google/cloud/logging/LogEntryTest.java | 31 +- .../cloud/logging/LoggingHandlerTest.java | 88 +- .../google/cloud/logging/LoggingImplTest.java | 254 ++-- .../cloud/logging/LoggingLevelTest.java | 21 +- .../cloud/logging/LoggingOptionsTest.java | 29 +- .../com/google/cloud/logging/LoggingTest.java | 25 +- .../google/cloud/logging/MetricInfoTest.java | 19 +- .../com/google/cloud/logging/MetricTest.java | 47 +- .../logging/MonitoredResourceUtilTest.java | 39 +- .../google/cloud/logging/OperationTest.java | 21 +- .../com/google/cloud/logging/OptionTest.java | 21 +- .../com/google/cloud/logging/PayloadTest.java | 13 +- .../cloud/logging/SerializationTest.java | 5 +- .../google/cloud/logging/SinkInfoTest.java | 33 +- .../com/google/cloud/logging/SinkTest.java | 45 +- .../cloud/logging/SourceLocationTest.java | 23 +- .../cloud/logging/TailLogEntriesTest.java | 15 +- .../logging/TimestampDefaultFilterTest.java | 9 +- .../cloud/logging/it/ITJulLoggerTest.java | 30 +- .../cloud/logging/it/ITLoggingTest.java | 44 +- .../cloud/logging/it/ITMetricsTest.java | 26 +- .../google/cloud/logging/it/ITSinkTest.java | 30 +- .../cloud/logging/it/ITTailLogsTest.java | 23 +- .../cloud/logging/it/ITTracingLogsTest.java | 37 +- .../cloud/logging/v2/ConfigClientTest.java | 1071 +++++++++-------- .../cloud/logging/v2/LoggingClientTest.java | 223 ++-- .../cloud/logging/v2/MetricsClientTest.java | 174 +-- pom.xml | 9 +- samples/install-without-bom/pom.xml | 12 +- samples/native-image-sample/pom.xml | 18 +- .../logging/ITNativeImageLoggingSample.java | 30 +- samples/pom.xml | 12 +- samples/snapshot/pom.xml | 12 +- samples/snippets/pom.xml | 12 +- .../java/com/example/logging/LoggingIT.java | 45 +- .../test/java/com/example/logging/LogsIT.java | 19 +- .../test/java/com/example/logging/SinkIT.java | 27 +- 46 files changed, 1406 insertions(+), 1410 deletions(-) diff --git a/google-cloud-logging/pom.xml b/google-cloud-logging/pom.xml index bbc6bfdf1..00287ace0 100644 --- a/google-cloud-logging/pom.xml +++ b/google-cloud-logging/pom.xml @@ -109,8 +109,18 @@ - junit - junit + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.junit.jupiter + junit-jupiter-params test diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/AutoPopulateMetadataTests.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/AutoPopulateMetadataTests.java index 7972ca7bf..e65567f16 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/AutoPopulateMetadataTests.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/AutoPopulateMetadataTests.java @@ -22,7 +22,7 @@ import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.newCapture; import static org.easymock.EasyMock.replay; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; import com.google.api.core.ApiFutures; import com.google.cloud.MonitoredResource; @@ -34,14 +34,11 @@ import com.google.logging.v2.WriteLogEntriesRequest; import com.google.logging.v2.WriteLogEntriesResponse; import org.easymock.Capture; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class AutoPopulateMetadataTests { +class AutoPopulateMetadataTests { private static final String LOG_NAME = "test-log"; private static final String RESOURCE_PROJECT_ID = "env-project-id"; @@ -81,8 +78,8 @@ public class AutoPopulateMetadataTests { private final Capture rpcWriteArgument = newCapture(); private ResourceTypeEnvironmentGetter mockedEnvGetter; - @Before - public void setup() { + @BeforeEach + void setup() { mockedEnvGetter = createMock(ResourceTypeEnvironmentGetter.class); mockedRpcFactory = createMock(LoggingRpcFactory.class); mockedRpc = createMock(LoggingRpc.class); @@ -106,8 +103,8 @@ public void setup() { logging = options.getService(); } - @After - public void teardown() { + @AfterEach + void teardown() { new ContextHandler().removeCurrentContext(); } @@ -124,7 +121,7 @@ private void mockCurrentContext( } @Test - public void testAutoPopulationEnabledInLoggingOptions() { + void testAutoPopulationEnabledInLoggingOptions() { mockCurrentContext(HTTP_REQUEST, TRACE_ID, SPAN_ID, TRACE_SAMPLED); logging.write(ImmutableList.of(SIMPLE_LOG_ENTRY)); @@ -138,7 +135,7 @@ public void testAutoPopulationEnabledInLoggingOptions() { } @Test - public void testAutoPopulationEnabledInWriteOptionsAndDisabledInLoggingOptions() { + void testAutoPopulationEnabledInWriteOptionsAndDisabledInLoggingOptions() { // redefine logging option to opt out auto-populating LoggingOptions options = logging.getOptions().toBuilder().setAutoPopulateMetadata(false).build(); @@ -156,7 +153,7 @@ public void testAutoPopulationEnabledInWriteOptionsAndDisabledInLoggingOptions() } @Test - public void testAutoPopulationDisabledInWriteOptions() { + void testAutoPopulationDisabledInWriteOptions() { mockCurrentContext(HTTP_REQUEST, TRACE_ID, SPAN_ID, TRACE_SAMPLED); logging.write(ImmutableList.of(SIMPLE_LOG_ENTRY), WriteOption.autoPopulateMetadata(false)); @@ -170,7 +167,7 @@ public void testAutoPopulationDisabledInWriteOptions() { } @Test - public void testSourceLocationPopulation() { + void testSourceLocationPopulation() { SourceLocation expected = SourceLocation.fromCurrentContext(); logging.write(ImmutableList.of(SIMPLE_LOG_ENTRY_WITH_DEBUG)); @@ -182,7 +179,7 @@ public void testSourceLocationPopulation() { } @Test - public void testNotFormattedTraceId() { + void testNotFormattedTraceId() { mockCurrentContext(HTTP_REQUEST, TRACE_ID, SPAN_ID, TRACE_SAMPLED); final MonitoredResource expectedResource = MonitoredResource.newBuilder("custom").build(); @@ -194,7 +191,7 @@ public void testNotFormattedTraceId() { } @Test - public void testMonitoredResourcePopulationInWriteOptions() { + void testMonitoredResourcePopulationInWriteOptions() { mockCurrentContext(HTTP_REQUEST, TRACE_ID, SPAN_ID, TRACE_SAMPLED); final MonitoredResource expectedResource = MonitoredResource.newBuilder("custom").build(); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java index 1e63dbdb2..810a92800 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java @@ -26,31 +26,30 @@ import java.time.format.DateTimeFormatter; import java.util.Calendar; import java.util.Iterator; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.rules.Timeout; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Timeout; /** * A base class for system tests. This class can be extended to run system tests in different * environments (e.g. local emulator or remote Logging service). */ +@Timeout(value = 600, unit = TimeUnit.SECONDS) public class BaseSystemTest { - @Rule public Timeout globalTimeout = Timeout.seconds(600); - private static final DateTimeFormatter RFC_3339 = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); protected static Logging logging; - @BeforeClass + @BeforeAll public static void beforeClass() { RemoteLoggingHelper helper = RemoteLoggingHelper.create(); logging = helper.getOptions().getService(); } - @AfterClass + @AfterAll public static void afterClass() throws Exception { logging.close(); } diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextHandlerTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextHandlerTest.java index a47ef9a2b..10cfce9f2 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextHandlerTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextHandlerTest.java @@ -16,17 +16,14 @@ package com.google.cloud.logging; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; import com.google.cloud.logging.ContextHandler.ContextPriority; import com.google.cloud.logging.HttpRequest.RequestMethod; -import org.junit.After; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class ContextHandlerTest { +class ContextHandlerTest { private static final HttpRequest OLD_HTTP_REQUEST = HttpRequest.newBuilder() .setRequestMethod(RequestMethod.POST) @@ -46,14 +43,14 @@ public class ContextHandlerTest { private static final String SPAN_ID = "1"; private static final boolean TRACE_SAMPLED = true; - @After - public void teardown() { + @AfterEach + void teardown() { new ContextHandler().removeCurrentContext(); new ContextHandler().removeCurrentContextPriority(); } @Test - public void testDefaultSetContext() { + void testDefaultSetContext() { Context newContext = Context.newBuilder() .setRequest(HTTP_REQUEST) @@ -71,7 +68,7 @@ public void testDefaultSetContext() { } @Test - public void testSetContextWithPriorityFromNoInput() { + void testSetContextWithPriorityFromNoInput() { Context newContext = Context.newBuilder() .setRequest(HTTP_REQUEST) @@ -89,7 +86,7 @@ public void testSetContextWithPriorityFromNoInput() { } @Test - public void testSetContextWithPriorityFromW3CHeader() { + void testSetContextWithPriorityFromW3CHeader() { Context newContext = Context.newBuilder() .setRequest(HTTP_REQUEST) @@ -107,7 +104,7 @@ public void testSetContextWithPriorityFromW3CHeader() { } @Test - public void testSetContextFromXCloudHeader() { + void testSetContextFromXCloudHeader() { Context newContext = Context.newBuilder() .setRequest(HTTP_REQUEST) @@ -125,7 +122,7 @@ public void testSetContextFromXCloudHeader() { } @Test - public void testSetContextFromOpenTelemetry() { + void testSetContextFromOpenTelemetry() { Context newContext = Context.newBuilder() .setRequest(HTTP_REQUEST) @@ -143,7 +140,7 @@ public void testSetContextFromOpenTelemetry() { } @Test - public void testOverrideW3CContextFromOpenTelemetry() { + void testOverrideW3CContextFromOpenTelemetry() { Context oldContext = Context.newBuilder() .setRequest(OLD_HTTP_REQUEST) @@ -170,7 +167,7 @@ public void testOverrideW3CContextFromOpenTelemetry() { } @Test - public void testOverrideXCTCContextFromOpenTelemetry() { + void testOverrideXCTCContextFromOpenTelemetry() { Context oldContext = Context.newBuilder() .setRequest(OLD_HTTP_REQUEST) @@ -198,7 +195,7 @@ public void testOverrideXCTCContextFromOpenTelemetry() { } @Test - public void testOverrideOtelContextFromDefaultSetContext() { + void testOverrideOtelContextFromDefaultSetContext() { Context oldContext = Context.newBuilder() .setRequest(OLD_HTTP_REQUEST) @@ -225,7 +222,7 @@ public void testOverrideOtelContextFromDefaultSetContext() { } @Test - public void testOverrideOtelContextFromW3C() { + void testOverrideOtelContextFromW3C() { Context oldContext = Context.newBuilder() .setRequest(OLD_HTTP_REQUEST) @@ -252,7 +249,7 @@ public void testOverrideOtelContextFromW3C() { } @Test - public void testOverrideOtelContextFromXCTC() { + void testOverrideOtelContextFromXCTC() { Context oldContext = Context.newBuilder() .setRequest(OLD_HTTP_REQUEST) diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextTest.java index 110e31b13..827329c7e 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextTest.java @@ -16,10 +16,10 @@ package com.google.cloud.logging; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import io.opentelemetry.api.trace.*; import io.opentelemetry.api.trace.Span; @@ -30,12 +30,9 @@ import io.opentelemetry.sdk.trace.SpanProcessor; import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor; import java.time.Duration; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class ContextTest { +class ContextTest { private static final HttpRequest.RequestMethod REQUEST_METHOD = HttpRequest.RequestMethod.GET; private static final String REQUEST_URL = "https://test.domain?arg=val"; @@ -81,7 +78,7 @@ public class ContextTest { .build(); @Test - public void testCompareContexts() { + void testCompareContexts() { Context context1 = Context.newBuilder() .setRequest(REQUEST) @@ -107,7 +104,7 @@ public void testCompareContexts() { } @Test - public void testContextBuilder() { + void testContextBuilder() { Context emptyContext = Context.newBuilder().build(); Context anotherContext = TEST_CONTEXT.toBuilder().build(); @@ -123,7 +120,7 @@ public void testContextBuilder() { } @Test - public void testParsingCloudTraceContext() { + void testParsingCloudTraceContext() { final String X_CLOUD_TRACE_NO_TRACE = "/SPAN_ID;o=TRACE_TRUE"; final String X_CLOUD_TRACE_ONLY = TEST_TRACE_ID; final String X_CLOUD_TRACE_WITH_SPAN = TEST_TRACE_ID + "/" + TEST_SPAN_ID; @@ -146,7 +143,7 @@ public void testParsingCloudTraceContext() { } @Test - public void testParsingW3CTraceParent() { + void testParsingW3CTraceParent() { final String W3C_TEST_TRACE_ID = "12345678901234567890123456789012"; final String W3C_TEST_SPAN_ID = "1234567890123456"; final String W3C_TEST_TRACE_SAMPLED = "0f"; @@ -162,7 +159,7 @@ public void testParsingW3CTraceParent() { } @Test - public void testParsingOpenTelemetryContext() { + void testParsingOpenTelemetryContext() { InMemorySpanExporter testExporter = InMemorySpanExporter.create(); SpanProcessor inMemorySpanProcessor = SimpleSpanProcessor.create(testExporter); OpenTelemetrySdk openTelemetrySdk = diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/ExclusionTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/ExclusionTest.java index 61b478404..d88cc4742 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/ExclusionTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/ExclusionTest.java @@ -16,17 +16,14 @@ package com.google.cloud.logging; import static com.google.protobuf.util.Timestamps.fromMillis; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; import com.google.protobuf.Timestamp; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class ExclusionTest { +class ExclusionTest { private static final String EXCLUSION_NAME = "load-balancer-exclusion"; private static final String DESCRIPTION = "description"; @@ -49,7 +46,7 @@ public class ExclusionTest { fromMillis(System.currentTimeMillis()); @Test - public void testBuilder() { + void testBuilder() { assertEquals(EXCLUSION_NAME, EXCLUSION.getName()); assertEquals(DESCRIPTION, EXCLUSION.getDescription()); assertEquals(EXCLUSION_FILTER, EXCLUSION.getFilter()); @@ -58,7 +55,7 @@ public void testBuilder() { } @Test - public void testToBuilder() { + void testToBuilder() { compareExclusion(EXCLUSION, EXCLUSION.toBuilder().build()); Exclusion exclusion = EXCLUSION.toBuilder() @@ -87,14 +84,14 @@ public void testToBuilder() { } @Test - public void testToAndFromProtobuf() { + void testToAndFromProtobuf() { compareExclusion(EXCLUSION, Exclusion.fromProtobuf(EXCLUSION.toProtobuf())); Exclusion exclusion = Exclusion.of(EXCLUSION_NAME, EXCLUSION_FILTER); compareExclusion(exclusion, Exclusion.fromProtobuf(exclusion.toProtobuf())); } @Test - public void testOf() { + void testOf() { Exclusion exclusion = Exclusion.of(EXCLUSION_NAME, EXCLUSION_FILTER); assertEquals(EXCLUSION_NAME, exclusion.getName()); assertEquals(EXCLUSION_FILTER, exclusion.getFilter()); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java index bc64d70a2..04ecd3ed8 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java @@ -16,19 +16,16 @@ package com.google.cloud.logging; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.cloud.logging.HttpRequest.RequestMethod; import java.time.Duration; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class HttpRequestTest { +class HttpRequestTest { private static final RequestMethod REQUEST_METHOD = RequestMethod.GET; private static final String REQUEST_URL = "http://www.example.com"; @@ -63,7 +60,7 @@ public class HttpRequestTest { .build(); @Test - public void testBuilder() { + void testBuilder() { assertEquals(REQUEST_METHOD, HTTP_REQUEST.getRequestMethod()); assertEquals(REQUEST_URL, HTTP_REQUEST.getRequestUrl()); assertEquals(REQUEST_SIZE, HTTP_REQUEST.getRequestSize()); @@ -80,7 +77,7 @@ public void testBuilder() { } @Test - public void testBuilderDefaultValues() { + void testBuilderDefaultValues() { HttpRequest httpRequest = HttpRequest.newBuilder().build(); assertNull(httpRequest.getRequestMethod()); assertNull(httpRequest.getRequestUrl()); @@ -99,7 +96,7 @@ public void testBuilderDefaultValues() { } @Test - public void testToBuilder() { + void testToBuilder() { compareHttpRequest(HTTP_REQUEST, HTTP_REQUEST.toBuilder().build()); HttpRequest httpRequest = HTTP_REQUEST.toBuilder() @@ -133,7 +130,7 @@ public void testToBuilder() { } @Test - public void testToAndFromPb() { + void testToAndFromPb() { HttpRequest httpRequest = HttpRequest.fromPb(HTTP_REQUEST.toPb()); compareHttpRequest(HTTP_REQUEST, httpRequest); assertEquals(REQUEST_METHOD, httpRequest.getRequestMethod()); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java index 2f94949ad..7aba605f1 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java @@ -16,7 +16,7 @@ package com.google.cloud.logging; -import static org.junit.Assert.assertSame; +import static org.junit.jupiter.api.Assertions.assertSame; import com.google.api.client.util.Lists; import com.google.cloud.Tuple; @@ -30,13 +30,10 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class InstrumentationTest { +class InstrumentationTest { private static final StringPayload STRING_PAYLOAD = StringPayload.of("payload"); private static final LogEntry STRING_ENTRY = LogEntry.newBuilder(STRING_PAYLOAD).build(); private static final String JAVA_OTHER_NAME = "java-other"; @@ -44,7 +41,7 @@ public class InstrumentationTest { private static final String JAVA_OTHER_VERSION = "0.0.0"; @Test - public void testInstrumentationGenerated() { + void testInstrumentationGenerated() { Instrumentation.setInstrumentationStatus(false); verifyEntries( Instrumentation.populateInstrumentationInfo(ImmutableList.of(STRING_ENTRY)), @@ -58,18 +55,18 @@ public void testInstrumentationGenerated() { } @Test - public void testNoInstrumentationGenerated() { + void testNoInstrumentationGenerated() { Instrumentation.setInstrumentationStatus(true); Tuple> pair = Instrumentation.populateInstrumentationInfo(ImmutableList.of(STRING_ENTRY)); ArrayList entries = Lists.newArrayList(pair.y()); - Assert.assertFalse(pair.x()); - Assert.assertEquals(1, entries.size()); + Assertions.assertFalse(pair.x()); + Assertions.assertEquals(1, entries.size()); assertSame(Payload.Type.STRING, entries.get(0).getPayload().getType()); } @Test - public void testInstrumentationUpdated() { + void testInstrumentationUpdated() { Instrumentation.setInstrumentationStatus(false); LogEntry jsonEntry = LogEntry.newBuilder(generateInstrumentationPayload(JAVA_OTHER_NAME, JAVA_OTHER_VERSION)) @@ -87,7 +84,7 @@ public void testInstrumentationUpdated() { } @Test - public void testInvalidInstrumentationRemoved() { + void testInvalidInstrumentationRemoved() { Instrumentation.setInstrumentationStatus(false); LogEntry jsonEntry = LogEntry.newBuilder(generateInstrumentationPayload(JAVA_INVALID_NAME, JAVA_OTHER_VERSION)) @@ -123,8 +120,8 @@ private static void verifyEntries( HashSet names, HashSet versions) { ArrayList entries = Lists.newArrayList(pair.y()); - Assert.assertTrue(pair.x()); - Assert.assertEquals(expected, entries.size()); + Assertions.assertTrue(pair.x()); + Assertions.assertEquals(expected, entries.size()); assertSame(Payload.Type.JSON, entries.get(index).getPayload().getType()); ListValue infoList = entries @@ -136,18 +133,18 @@ private static void verifyEntries( .getFieldsOrThrow(Instrumentation.INSTRUMENTATION_SOURCE_KEY) .getListValue(); for (Value val : infoList.getValuesList()) { - Assert.assertTrue( + Assertions.assertTrue( names.remove( val.getStructValue() .getFieldsOrThrow(Instrumentation.INSTRUMENTATION_NAME_KEY) .getStringValue())); - Assert.assertTrue( + Assertions.assertTrue( versions.remove( val.getStructValue() .getFieldsOrThrow(Instrumentation.INSTRUMENTATION_VERSION_KEY) .getStringValue())); } - Assert.assertEquals(0, names.size()); - Assert.assertEquals(0, versions.size()); + Assertions.assertEquals(0, names.size()); + Assertions.assertEquals(0, versions.size()); } } diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/InvalidContextTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/InvalidContextTest.java index 538766d47..e72922fc8 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/InvalidContextTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/InvalidContextTest.java @@ -16,18 +16,14 @@ package com.google.cloud.logging; -import static org.junit.Assert.assertThrows; +import static org.junit.jupiter.api.Assertions.assertThrows; import java.util.Arrays; import java.util.List; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; -@RunWith(Parameterized.class) -public class InvalidContextTest { - @Parameters +class InvalidContextTest { public static List data() { final String[] INVALID_W3C_TRACE_CONTEXTS = { "", @@ -45,14 +41,9 @@ public static List data() { return Arrays.asList(INVALID_W3C_TRACE_CONTEXTS); } - private final String traceContext; - - public InvalidContextTest(String traceContext) { - this.traceContext = traceContext; - } - - @Test - public void testAssertionInvalidContext() { + @ParameterizedTest + @MethodSource("data") + void testAssertionInvalidContext(String traceContext) { Context.Builder builder = Context.newBuilder(); assertThrows( IllegalArgumentException.class, () -> builder.loadW3CTraceParentContext(traceContext)); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/LogEntryTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/LogEntryTest.java index 3e44cccde..14cb529c6 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/LogEntryTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/LogEntryTest.java @@ -16,10 +16,10 @@ package com.google.cloud.logging; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThrows; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import com.google.cloud.MonitoredResource; import com.google.cloud.logging.Payload.JsonPayload; @@ -31,13 +31,10 @@ import com.google.protobuf.Any; import com.google.protobuf.Empty; import java.time.Instant; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) @SuppressWarnings("deprecation") // We're testing our own deprecated Builder methods -public class LogEntryTest { +class LogEntryTest { private static final String LOG_NAME = "syslog"; private static final String PROJECT = "project"; @@ -130,7 +127,7 @@ public class LogEntryTest { STRING_ENTRY.toBuilder().setDestination(ORG_NAME).build(); @Test - public void testOf() { + void testOf() { LogEntry logEntry = LogEntry.of(STRING_PAYLOAD); assertEquals(STRING_PAYLOAD, logEntry.getPayload()); assertEquals(Severity.DEFAULT, logEntry.getSeverity()); @@ -169,7 +166,7 @@ public void testOf() { } @Test - public void testBuilder() { + void testBuilder() { assertEquals(LOG_NAME, STRING_ENTRY.getLogName()); assertEquals(RESOURCE, STRING_ENTRY.getResource()); assertEquals(TIMESTAMP.toEpochMilli(), (long) STRING_ENTRY.getTimestamp()); @@ -256,7 +253,7 @@ public void testBuilder() { } @Test - public void testToBuilder() { + void testToBuilder() { compareLogEntry(STRING_ENTRY, STRING_ENTRY.toBuilder().build(), true); HttpRequest request = HttpRequest.newBuilder() @@ -317,7 +314,7 @@ public void testToBuilder() { } @Test - public void testToAndFromPb() { + void testToAndFromPb() { compareLogEntry(STRING_ENTRY, LogEntry.fromPb(STRING_ENTRY.toPb(PROJECT)), false); compareLogEntry(JSON_ENTRY, LogEntry.fromPb(JSON_ENTRY.toPb(PROJECT)), false); compareLogEntry(PROTO_ENTRY, LogEntry.fromPb(PROTO_ENTRY.toPb(PROJECT)), false); @@ -341,7 +338,7 @@ public void testToAndFromPb() { } @Test - public void testToAndFromPbWithExpectedFailure() { + void testToAndFromPbWithExpectedFailure() { LogEntry logEntry = LogEntry.newBuilder(STRING_PAYLOAD).setLogName(LOG_NAME).setResource(RESOURCE).build(); assertThrows( @@ -378,7 +375,7 @@ private void compareLogEntry(LogEntry expected, LogEntry value, boolean extraVal private static final LogEntry[] TEST_LOG_ENTRIES = {STRING_ENTRY, JSON_ENTRY}; @Test - public void testStructureLogPresentations() { + void testStructureLogPresentations() { for (int i = 0; i < TEST_LOG_ENTRIES.length; i++) { String structuredLog = TEST_LOG_ENTRIES[i].toStructuredJsonString(); @@ -389,12 +386,12 @@ public void testStructureLogPresentations() { } @Test - public void testStructureLogPresentationWithProtobufPayload() { + void testStructureLogPresentationWithProtobufPayload() { assertThrows(UnsupportedOperationException.class, () -> PROTO_ENTRY.toStructuredJsonString()); } @Test - public void testStructureLogInvalidSeverity() { + void testStructureLogInvalidSeverity() { assertThrows( IllegalArgumentException.class, () -> PROTO_ENTRY.toBuilder().setSeverity(Severity.NONE).build().toPb(PROJECT)); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingHandlerTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingHandlerTest.java index abd88053e..ffce6f426 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingHandlerTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingHandlerTest.java @@ -22,7 +22,7 @@ import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.reset; import static org.easymock.EasyMock.verify; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import com.google.cloud.MonitoredResource; import com.google.cloud.logging.Logging.WriteOption; @@ -41,18 +41,15 @@ import java.util.logging.LogRecord; import java.util.logging.Logger; import org.easymock.EasyMock; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.junit.rules.ExternalResource; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -@RunWith(JUnit4.class) // We're testing our own deprecated Builder methods. +// We're testing our own deprecated Builder methods. @SuppressWarnings("deprecation") -public class LoggingHandlerTest { +class LoggingHandlerTest { private static final String LOG_NAME = "java.log"; private static final String MESSAGE = "message"; @@ -227,7 +224,7 @@ void patch() { } @Override - protected void after() { + public void after() { System.setOut(oldOut); System.setErr(oldErr); } @@ -239,10 +236,15 @@ static class CustomLevel extends Level { } } - @Rule public final OutputStreamPatcher outputStreamPatcher = new OutputStreamPatcher(); + public final OutputStreamPatcher outputStreamPatcher = new OutputStreamPatcher(); - @Before - public void setUp() { + @org.junit.jupiter.api.AfterEach + void tearDownPatcher() { + outputStreamPatcher.after(); + } + + @BeforeEach + void setUp() { Instrumentation.setInstrumentationStatus(true); logging = EasyMock.createMock(Logging.class); options = EasyMock.createMock(LoggingOptions.class); @@ -255,8 +257,8 @@ public void setUp() { expectLastCall().anyTimes(); } - @After - public void after() { + @AfterEach + void after() { verify(logging, options); } @@ -267,7 +269,7 @@ private static LogRecord newLogRecord(Level level, String message) { } @Test - public void testDefaultHandlerCreation() { + void testDefaultHandlerCreation() { String oldProject = System.getProperty(PROJECT_ENV_NAME); System.setProperty(PROJECT_ENV_NAME, PROJECT); replay(options, logging); @@ -280,7 +282,7 @@ public void testDefaultHandlerCreation() { } @Test - public void testPublishLevels() { + void testPublishLevels() { logging.write(ImmutableList.of(FINEST_ENTRY), DEFAULT_OPTIONS); expectLastCall().once(); logging.write(ImmutableList.of(FINER_ENTRY), DEFAULT_OPTIONS); @@ -329,7 +331,7 @@ public void testPublishLevels() { } @Test - public void testPublishCustomResource() { + void testPublishCustomResource() { MonitoredResource resource = MonitoredResource.of("custom", ImmutableMap.of()); logging.write( ImmutableList.of(FINEST_ENTRY), @@ -345,29 +347,29 @@ public void testPublishCustomResource() { } @Test - public void testPublishCustomResourceWithFolder() { + void testPublishCustomResourceWithFolder() { testPublishCustomResourceWithDestination(FINEST_ENTRY, LogDestinationName.folder("folder")); } @Test - public void testPublishCustomResourceWithBilling() { + void testPublishCustomResourceWithBilling() { testPublishCustomResourceWithDestination( FINEST_ENTRY, LogDestinationName.billingAccount("billing")); } @Test - public void testPublishCustomResourceWithOrganization() { + void testPublishCustomResourceWithOrganization() { testPublishCustomResourceWithDestination( FINEST_ENTRY, LogDestinationName.organization("organization")); } @Test - public void testPublishCustomResourceWithProject() { + void testPublishCustomResourceWithProject() { testPublishCustomResourceWithDestination(FINEST_ENTRY, LogDestinationName.project(PROJECT)); } @Test - public void testPublishKubernetesContainerResource() { + void testPublishKubernetesContainerResource() { MonitoredResource resource = MonitoredResource.of( "k8s_container", @@ -396,7 +398,7 @@ public void testPublishKubernetesContainerResource() { } @Test - public void testEnhancedLogEntry() { + void testEnhancedLogEntry() { logging.write(ImmutableList.of(FINEST_ENHANCED_ENTRY), DEFAULT_OPTIONS); expectLastCall().once(); replay(options, logging); @@ -416,7 +418,7 @@ void validateJsonOutput(ByteArrayOutputStream bout) throws UnsupportedEncodingEx } @Test - public void testEnhancedLogEntryPrintToStdout() throws UnsupportedEncodingException { + void testEnhancedLogEntryPrintToStdout() throws UnsupportedEncodingException { outputStreamPatcher.patch(); replay(options, logging); @@ -433,7 +435,7 @@ public void testEnhancedLogEntryPrintToStdout() throws UnsupportedEncodingExcept } @Test - public void testEnhancedLogEntryPrintToStderr() throws UnsupportedEncodingException { + void testEnhancedLogEntryPrintToStderr() throws UnsupportedEncodingException { outputStreamPatcher.patch(); replay(options, logging); @@ -450,7 +452,7 @@ public void testEnhancedLogEntryPrintToStderr() throws UnsupportedEncodingExcept } @Test - public void testTraceEnhancedLogEntry() { + void testTraceEnhancedLogEntry() { logging.write(ImmutableList.of(TRACE_ENTRY), DEFAULT_OPTIONS); expectLastCall().once(); replay(options, logging); @@ -466,7 +468,7 @@ public void testTraceEnhancedLogEntry() { } @Test - public void testReportWriteError() { + void testReportWriteError() { RuntimeException ex = new RuntimeException(); logging.write(ImmutableList.of(FINEST_ENTRY), DEFAULT_OPTIONS); expectLastCall().andStubThrow(ex); @@ -484,7 +486,7 @@ public void testReportWriteError() { } @Test - public void testReportFlushError() { + void testReportFlushError() { RuntimeException ex = new RuntimeException(); logging.write(ImmutableList.of(FINEST_ENTRY), DEFAULT_OPTIONS); expectLastCall().once(); @@ -505,7 +507,7 @@ public void testReportFlushError() { } @Test - public void testReportFormatError() { + void testReportFormatError() { replay(options, logging); Formatter formatter = EasyMock.createStrictMock(Formatter.class); RuntimeException ex = new RuntimeException(); @@ -524,9 +526,9 @@ public void testReportFormatError() { } // BUG(1795): rewrite this test when flush actually works. - @Ignore + @Disabled @Test - public void testFlushLevel() { + void testFlushLevel() { logging.setFlushSeverity(Severity.WARNING); expectLastCall().once(); logging.write( @@ -548,7 +550,7 @@ public void testFlushLevel() { } @Test - public void testFlushLevelOff() { + void testFlushLevelOff() { logging.setFlushSeverity(Severity.NONE); expectLastCall().once(); replay(options, logging); @@ -558,7 +560,7 @@ public void testFlushLevelOff() { } @Test - public void testFlushLevelOn() { + void testFlushLevelOn() { logging.setFlushSeverity(Severity.WARNING); expectLastCall().once(); replay(options, logging); @@ -568,7 +570,7 @@ public void testFlushLevelOn() { } @Test - public void testCustomFlushLevelOn() { + void testCustomFlushLevelOn() { CustomLevel level = new CustomLevel(); logging.setFlushSeverity(Severity.INFO); expectLastCall().once(); @@ -579,7 +581,7 @@ public void testCustomFlushLevelOn() { } @Test - public void testSyncWrite() { + void testSyncWrite() { reset(logging); LogEntry entry = LogEntry.newBuilder(Payload.StringPayload.of(MESSAGE)) @@ -605,7 +607,7 @@ public void testSyncWrite() { } @Test - public void testAddHandler() { + void testAddHandler() { logging.write(ImmutableList.of(FINEST_ENTRY), DEFAULT_OPTIONS); expectLastCall().once(); replay(options, logging); @@ -625,7 +627,7 @@ public void close() { } @Test - public void testClose() throws Exception { + void testClose() throws Exception { logging.write(ImmutableList.of(FINEST_ENTRY), DEFAULT_OPTIONS); expectLastCall().once(); logging.close(); @@ -666,7 +668,7 @@ private void setupOptionsToEnableAutoPopulation(boolean expectDiagnostic) { } @Test - public void testAutoPopulationEnabled() { + void testAutoPopulationEnabled() { setupOptionsToEnableAutoPopulation(/* expectDiagnostic= */ false); logging.write(ImmutableList.of(INFO_ENTRY), DEFAULT_OPTIONS); expectLastCall().once(); @@ -686,7 +688,7 @@ public void testAutoPopulationEnabled() { // Test the deprecated get/setRedirectToStdout methods. @SuppressWarnings("deprecation") @Test - public void testSetRedirectToStdoutImpliesLogTarget() { + void testSetRedirectToStdoutImpliesLogTarget() { replay(options, logging); LoggingHandler handler = new LoggingHandler(LOG_NAME, options, DEFAULT_RESOURCE); @@ -699,7 +701,7 @@ public void testSetRedirectToStdoutImpliesLogTarget() { } @Test - public void testRedirectToStdout() { + void testRedirectToStdout() { setupOptionsToEnableAutoPopulation(/* expectDiagnostic= */ true); replay(options, logging); outputStreamPatcher.patch(); @@ -716,7 +718,7 @@ public void testRedirectToStdout() { } @Test - public void testRedirectToStderr() { + void testRedirectToStderr() { setupOptionsToEnableAutoPopulation(/* expectDiagnostic= */ true); replay(options, logging); outputStreamPatcher.patch(); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java index 15bba950f..01542edb6 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java @@ -18,12 +18,12 @@ import static com.google.protobuf.util.Timestamps.fromMillis; import static org.easymock.EasyMock.replay; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; @@ -82,14 +82,11 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicInteger; import org.easymock.EasyMock; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class LoggingImplTest { +class LoggingImplTest { private static final String PROJECT = "project"; private static final String ANOTHER_PROJECT = "projectoverride"; @@ -240,8 +237,8 @@ private void configureListLogsTests( EasyMock.replay(loggingRpcMock); } - @Before - public void setUp() { + @BeforeEach + void setUp() { Instrumentation.setInstrumentationStatus(true); rpcFactoryMock = EasyMock.createStrictMock(LoggingRpcFactory.class); loggingRpcMock = EasyMock.createStrictMock(LoggingRpc.class); @@ -272,19 +269,19 @@ public String createDefaultTimestampFilter() { }; } - @After - public void tearDown() { + @AfterEach + void tearDown() { EasyMock.verify(rpcFactoryMock, loggingRpcMock); } @Test - public void testGetOptions() { + void testGetOptions() { EasyMock.replay(rpcFactoryMock, loggingRpcMock); assertSame(options, options.getService().getOptions()); } @Test - public void testCreateSink() { + void testCreateSink() { LogSink sinkPb = SINK_INFO.toPb(PROJECT); ApiFuture response = ApiFutures.immediateFuture(sinkPb); CreateSinkRequest request = @@ -297,7 +294,7 @@ public void testCreateSink() { } @Test - public void testCreateSinkAsync() throws ExecutionException, InterruptedException { + void testCreateSinkAsync() throws ExecutionException, InterruptedException { LogSink sinkPb = SINK_INFO.toPb(PROJECT); ApiFuture response = ApiFutures.immediateFuture(sinkPb); CreateSinkRequest request = @@ -310,7 +307,7 @@ public void testCreateSinkAsync() throws ExecutionException, InterruptedExceptio } @Test - public void testUpdateSink() { + void testUpdateSink() { LogSink sinkPb = SINK_INFO.toPb(PROJECT); ApiFuture response = ApiFutures.immediateFuture(sinkPb); UpdateSinkRequest request = @@ -323,7 +320,7 @@ public void testUpdateSink() { } @Test - public void testUpdateSinkAsync() throws ExecutionException, InterruptedException { + void testUpdateSinkAsync() throws ExecutionException, InterruptedException { LogSink sinkPb = SINK_INFO.toPb(PROJECT); ApiFuture response = ApiFutures.immediateFuture(sinkPb); UpdateSinkRequest request = @@ -336,7 +333,7 @@ public void testUpdateSinkAsync() throws ExecutionException, InterruptedExceptio } @Test - public void testGetSink() { + void testGetSink() { LogSink sinkPb = SINK_INFO.toPb(PROJECT); ApiFuture response = ApiFutures.immediateFuture(sinkPb); GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(SINK_NAME_PB).build(); @@ -348,7 +345,7 @@ public void testGetSink() { } @Test - public void testGetSink_null() { + void testGetSink_null() { ApiFuture response = ApiFutures.immediateFuture(null); GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(SINK_NAME_PB).build(); EasyMock.expect(loggingRpcMock.get(request)).andReturn(response); @@ -358,7 +355,7 @@ public void testGetSink_null() { } @Test - public void testGetSinkAsync() throws ExecutionException, InterruptedException { + void testGetSinkAsync() throws ExecutionException, InterruptedException { LogSink sinkPb = SINK_INFO.toPb(PROJECT); ApiFuture response = ApiFutures.immediateFuture(sinkPb); GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(SINK_NAME_PB).build(); @@ -370,7 +367,7 @@ public void testGetSinkAsync() throws ExecutionException, InterruptedException { } @Test - public void testGetSinkAsync_null() throws ExecutionException, InterruptedException { + void testGetSinkAsync_null() throws ExecutionException, InterruptedException { ApiFuture response = ApiFutures.immediateFuture(null); GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(SINK_NAME_PB).build(); EasyMock.expect(loggingRpcMock.get(request)).andReturn(response); @@ -380,7 +377,7 @@ public void testGetSinkAsync_null() throws ExecutionException, InterruptedExcept } @Test - public void testDeleteSink() { + void testDeleteSink() { DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(SINK_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(Empty.getDefaultInstance()); EasyMock.expect(loggingRpcMock.delete(request)).andReturn(response); @@ -390,7 +387,7 @@ public void testDeleteSink() { } @Test - public void testDeleteSink_null() { + void testDeleteSink_null() { DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(SINK_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(null); EasyMock.expect(loggingRpcMock.delete(request)).andReturn(response); @@ -400,7 +397,7 @@ public void testDeleteSink_null() { } @Test - public void testDeleteSinkAsync() throws ExecutionException, InterruptedException { + void testDeleteSinkAsync() throws ExecutionException, InterruptedException { DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(SINK_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(Empty.getDefaultInstance()); EasyMock.expect(loggingRpcMock.delete(request)).andReturn(response); @@ -410,7 +407,7 @@ public void testDeleteSinkAsync() throws ExecutionException, InterruptedExceptio } @Test - public void testDeleteSinkAsync_null() throws ExecutionException, InterruptedException { + void testDeleteSinkAsync_null() throws ExecutionException, InterruptedException { DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(SINK_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(null); EasyMock.expect(loggingRpcMock.delete(request)).andReturn(response); @@ -420,7 +417,7 @@ public void testDeleteSinkAsync_null() throws ExecutionException, InterruptedExc } @Test - public void testListSinks() { + void testListSinks() { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -443,7 +440,7 @@ public void testListSinks() { } @Test - public void testListSinksNextPage() { + void testListSinksNextPage() { String cursor1 = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -481,7 +478,7 @@ public void testListSinksNextPage() { } @Test - public void testListSinksEmpty() { + void testListSinksEmpty() { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListSinksRequest request = ListSinksRequest.newBuilder().setParent(PROJECT_PARENT).build(); @@ -501,7 +498,7 @@ public void testListSinksEmpty() { } @Test - public void testListSinksWithOptions() { + void testListSinksWithOptions() { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -529,7 +526,7 @@ public void testListSinksWithOptions() { } @Test - public void testListSinksAsync() throws ExecutionException, InterruptedException { + void testListSinksAsync() throws ExecutionException, InterruptedException { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -552,7 +549,7 @@ public void testListSinksAsync() throws ExecutionException, InterruptedException } @Test - public void testListSinksAsyncNextPage() throws ExecutionException, InterruptedException { + void testListSinksAsyncNextPage() throws ExecutionException, InterruptedException { String cursor1 = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -590,7 +587,7 @@ public void testListSinksAsyncNextPage() throws ExecutionException, InterruptedE } @Test - public void testListSinksAsyncEmpty() throws ExecutionException, InterruptedException { + void testListSinksAsyncEmpty() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListSinksRequest request = ListSinksRequest.newBuilder().setParent(PROJECT_PARENT).build(); @@ -610,7 +607,7 @@ public void testListSinksAsyncEmpty() throws ExecutionException, InterruptedExce } @Test - public void testListSinksWithOptionsAsync() throws ExecutionException, InterruptedException { + void testListSinksWithOptionsAsync() throws ExecutionException, InterruptedException { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -639,7 +636,7 @@ public void testListSinksWithOptionsAsync() throws ExecutionException, Interrupt } @Test - public void testCreateMetric() { + void testCreateMetric() { LogMetric metricPb = METRIC_INFO.toPb(); ApiFuture response = ApiFutures.immediateFuture(metricPb); CreateLogMetricRequest request = @@ -652,7 +649,7 @@ public void testCreateMetric() { } @Test - public void testCreateMetricAsync() throws ExecutionException, InterruptedException { + void testCreateMetricAsync() throws ExecutionException, InterruptedException { LogMetric metricPb = METRIC_INFO.toPb(); ApiFuture response = ApiFutures.immediateFuture(metricPb); CreateLogMetricRequest request = @@ -665,7 +662,7 @@ public void testCreateMetricAsync() throws ExecutionException, InterruptedExcept } @Test - public void testUpdateMetric() { + void testUpdateMetric() { LogMetric sinkPb = METRIC_INFO.toPb(); ApiFuture response = ApiFutures.immediateFuture(sinkPb); UpdateLogMetricRequest request = @@ -678,7 +675,7 @@ public void testUpdateMetric() { } @Test - public void testUpdateMetricAsync() throws ExecutionException, InterruptedException { + void testUpdateMetricAsync() throws ExecutionException, InterruptedException { LogMetric sinkPb = METRIC_INFO.toPb(); ApiFuture response = ApiFutures.immediateFuture(sinkPb); UpdateLogMetricRequest request = @@ -691,7 +688,7 @@ public void testUpdateMetricAsync() throws ExecutionException, InterruptedExcept } @Test - public void testGetMetric() { + void testGetMetric() { LogMetric sinkPb = METRIC_INFO.toPb(); ApiFuture response = ApiFutures.immediateFuture(sinkPb); GetLogMetricRequest request = @@ -704,7 +701,7 @@ public void testGetMetric() { } @Test - public void testGetMetric_null() { + void testGetMetric_null() { ApiFuture response = ApiFutures.immediateFuture(null); GetLogMetricRequest request = GetLogMetricRequest.newBuilder().setMetricName(METRIC_NAME_PB).build(); @@ -715,7 +712,7 @@ public void testGetMetric_null() { } @Test - public void testGetMetricAsync() throws ExecutionException, InterruptedException { + void testGetMetricAsync() throws ExecutionException, InterruptedException { LogMetric sinkPb = METRIC_INFO.toPb(); ApiFuture response = ApiFutures.immediateFuture(sinkPb); GetLogMetricRequest request = @@ -728,7 +725,7 @@ public void testGetMetricAsync() throws ExecutionException, InterruptedException } @Test - public void testGetMetricAsync_null() throws ExecutionException, InterruptedException { + void testGetMetricAsync_null() throws ExecutionException, InterruptedException { ApiFuture response = ApiFutures.immediateFuture(null); GetLogMetricRequest request = GetLogMetricRequest.newBuilder().setMetricName(METRIC_NAME_PB).build(); @@ -739,7 +736,7 @@ public void testGetMetricAsync_null() throws ExecutionException, InterruptedExce } @Test - public void testDeleteMetric() { + void testDeleteMetric() { DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder().setMetricName(METRIC_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(Empty.getDefaultInstance()); @@ -750,7 +747,7 @@ public void testDeleteMetric() { } @Test - public void testDeleteMetric_null() { + void testDeleteMetric_null() { DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder().setMetricName(METRIC_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(null); @@ -761,7 +758,7 @@ public void testDeleteMetric_null() { } @Test - public void testDeleteMetricAsync() throws ExecutionException, InterruptedException { + void testDeleteMetricAsync() throws ExecutionException, InterruptedException { DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder().setMetricName(METRIC_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(Empty.getDefaultInstance()); @@ -772,7 +769,7 @@ public void testDeleteMetricAsync() throws ExecutionException, InterruptedExcept } @Test - public void testDeleteMetricAsync_null() throws ExecutionException, InterruptedException { + void testDeleteMetricAsync_null() throws ExecutionException, InterruptedException { DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder().setMetricName(METRIC_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(null); @@ -783,7 +780,7 @@ public void testDeleteMetricAsync_null() throws ExecutionException, InterruptedE } @Test - public void testListMetrics() { + void testListMetrics() { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -807,7 +804,7 @@ public void testListMetrics() { } @Test - public void testListMetricsNextPage() { + void testListMetricsNextPage() { String cursor1 = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -846,7 +843,7 @@ public void testListMetricsNextPage() { } @Test - public void testListMetricsEmpty() { + void testListMetricsEmpty() { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListLogMetricsRequest request = @@ -867,7 +864,7 @@ public void testListMetricsEmpty() { } @Test - public void testListMetricsWithOptions() { + void testListMetricsWithOptions() { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -895,7 +892,7 @@ public void testListMetricsWithOptions() { } @Test - public void testListMetricsAsync() throws ExecutionException, InterruptedException { + void testListMetricsAsync() throws ExecutionException, InterruptedException { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -919,7 +916,7 @@ public void testListMetricsAsync() throws ExecutionException, InterruptedExcepti } @Test - public void testListMetricsAsyncNextPage() throws ExecutionException, InterruptedException { + void testListMetricsAsyncNextPage() throws ExecutionException, InterruptedException { String cursor1 = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -958,7 +955,7 @@ public void testListMetricsAsyncNextPage() throws ExecutionException, Interrupte } @Test - public void testListMetricsAsyncEmpty() throws ExecutionException, InterruptedException { + void testListMetricsAsyncEmpty() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListLogMetricsRequest request = @@ -979,7 +976,7 @@ public void testListMetricsAsyncEmpty() throws ExecutionException, InterruptedEx } @Test - public void testListMetricsWithOptionsAsync() throws ExecutionException, InterruptedException { + void testListMetricsWithOptionsAsync() throws ExecutionException, InterruptedException { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -1008,7 +1005,7 @@ public void testListMetricsWithOptionsAsync() throws ExecutionException, Interru } @Test - public void testCreateExclusion() { + void testCreateExclusion() { LogExclusion exclusionPb = EXCLUSION.toProtobuf(); ApiFuture response = ApiFutures.immediateFuture(exclusionPb); CreateExclusionRequest request = @@ -1028,7 +1025,7 @@ public void testCreateExclusion() { } @Test - public void testCreateExclusionAsync() throws ExecutionException, InterruptedException { + void testCreateExclusionAsync() throws ExecutionException, InterruptedException { LogExclusion exclusionPb = EXCLUSION.toProtobuf(); ApiFuture response = ApiFutures.immediateFuture(exclusionPb); CreateExclusionRequest request = @@ -1048,7 +1045,7 @@ public void testCreateExclusionAsync() throws ExecutionException, InterruptedExc } @Test - public void testGetExclusion() { + void testGetExclusion() { LogExclusion exclusionPb = EXCLUSION.toProtobuf(); ApiFuture response = ApiFutures.immediateFuture(exclusionPb); GetExclusionRequest request = @@ -1065,7 +1062,7 @@ public void testGetExclusion() { } @Test - public void testGetExclusion_null() { + void testGetExclusion_null() { ApiFuture response = ApiFutures.immediateFuture(null); GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(EXCLUSION_NAME_PB).build(); @@ -1077,7 +1074,7 @@ public void testGetExclusion_null() { } @Test - public void testGetExclusionAsync() throws ExecutionException, InterruptedException { + void testGetExclusionAsync() throws ExecutionException, InterruptedException { LogExclusion exclusionPb = EXCLUSION.toProtobuf(); ApiFuture response = ApiFutures.immediateFuture(exclusionPb); GetExclusionRequest request = @@ -1094,7 +1091,7 @@ public void testGetExclusionAsync() throws ExecutionException, InterruptedExcept } @Test - public void testGetExclusionAsync_null() throws ExecutionException, InterruptedException { + void testGetExclusionAsync_null() throws ExecutionException, InterruptedException { ApiFuture response = ApiFutures.immediateFuture(null); GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(EXCLUSION_NAME_PB).build(); @@ -1106,7 +1103,7 @@ public void testGetExclusionAsync_null() throws ExecutionException, InterruptedE } @Test - public void testUpdateExclusion() { + void testUpdateExclusion() { LogExclusion exclusionPb = EXCLUSION1.toProtobuf(); ApiFuture response = ApiFutures.immediateFuture(exclusionPb); UpdateExclusionRequest request = @@ -1126,7 +1123,7 @@ public void testUpdateExclusion() { } @Test - public void testUpdateExclusionAsync() throws ExecutionException, InterruptedException { + void testUpdateExclusionAsync() throws ExecutionException, InterruptedException { LogExclusion exclusionPb = EXCLUSION1.toProtobuf(); ApiFuture response = ApiFutures.immediateFuture(exclusionPb); UpdateExclusionRequest request = @@ -1146,7 +1143,7 @@ public void testUpdateExclusionAsync() throws ExecutionException, InterruptedExc } @Test - public void testDeleteExclusion() { + void testDeleteExclusion() { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(EXCLUSION_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(Empty.getDefaultInstance()); @@ -1157,7 +1154,7 @@ public void testDeleteExclusion() { } @Test - public void testDeleteExclusion_null() { + void testDeleteExclusion_null() { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(EXCLUSION_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(null); @@ -1168,7 +1165,7 @@ public void testDeleteExclusion_null() { } @Test - public void testDeleteExclusionAsync() throws ExecutionException, InterruptedException { + void testDeleteExclusionAsync() throws ExecutionException, InterruptedException { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(EXCLUSION_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(Empty.getDefaultInstance()); @@ -1179,7 +1176,7 @@ public void testDeleteExclusionAsync() throws ExecutionException, InterruptedExc } @Test - public void testDeleteExclusionAsync_null() throws ExecutionException, InterruptedException { + void testDeleteExclusionAsync_null() throws ExecutionException, InterruptedException { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(EXCLUSION_NAME_PB).build(); ApiFuture response = ApiFutures.immediateFuture(null); @@ -1190,7 +1187,7 @@ public void testDeleteExclusionAsync_null() throws ExecutionException, Interrupt } @Test - public void testListExclusions() { + void testListExclusions() { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListExclusionsRequest request = @@ -1214,7 +1211,7 @@ public void testListExclusions() { } @Test - public void testListExclusionEmpty() { + void testListExclusionEmpty() { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListExclusionsRequest request = @@ -1236,7 +1233,7 @@ public void testListExclusionEmpty() { } @Test - public void testListExclusionNextPage() { + void testListExclusionNextPage() { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListExclusionsRequest request1 = @@ -1273,7 +1270,7 @@ public void testListExclusionNextPage() { } @Test - public void testListExclusionWithOptions() { + void testListExclusionWithOptions() { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListExclusionsRequest request = @@ -1302,7 +1299,7 @@ public void testListExclusionWithOptions() { } @Test - public void testListExclusionsAsync() throws ExecutionException, InterruptedException { + void testListExclusionsAsync() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListExclusionsRequest request = @@ -1326,7 +1323,7 @@ public void testListExclusionsAsync() throws ExecutionException, InterruptedExce } @Test - public void testListExclusionAsyncEmpty() throws ExecutionException, InterruptedException { + void testListExclusionAsyncEmpty() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListExclusionsRequest request = @@ -1348,7 +1345,7 @@ public void testListExclusionAsyncEmpty() throws ExecutionException, Interrupted } @Test - public void testListExclusionAsyncNextPage() throws ExecutionException, InterruptedException { + void testListExclusionAsyncNextPage() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListExclusionsRequest request1 = @@ -1385,7 +1382,7 @@ public void testListExclusionAsyncNextPage() throws ExecutionException, Interrup } @Test - public void testListExclusionAsyncWithOptions() throws ExecutionException, InterruptedException { + void testListExclusionAsyncWithOptions() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListExclusionsRequest request = @@ -1414,7 +1411,7 @@ public void testListExclusionAsyncWithOptions() throws ExecutionException, Inter } @Test - public void testListResourceDescriptor() { + void testListResourceDescriptor() { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -1440,7 +1437,7 @@ public void testListResourceDescriptor() { } @Test - public void testListResourceDescriptorNextPage() { + void testListResourceDescriptorNextPage() { String cursor1 = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -1484,7 +1481,7 @@ public void testListResourceDescriptorNextPage() { } @Test - public void testListResourceDescriptorEmpty() { + void testListResourceDescriptorEmpty() { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListMonitoredResourceDescriptorsRequest request = @@ -1509,7 +1506,7 @@ public void testListResourceDescriptorEmpty() { } @Test - public void testListResourceDescriptorWithOptions() { + void testListResourceDescriptorWithOptions() { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -1540,7 +1537,7 @@ public void testListResourceDescriptorWithOptions() { } @Test - public void testListResourceDescriptorAsync() throws ExecutionException, InterruptedException { + void testListResourceDescriptorAsync() throws ExecutionException, InterruptedException { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -1567,8 +1564,7 @@ public void testListResourceDescriptorAsync() throws ExecutionException, Interru } @Test - public void testListResourceDescriptorAsyncNextPage() - throws ExecutionException, InterruptedException { + void testListResourceDescriptorAsyncNextPage() throws ExecutionException, InterruptedException { String cursor1 = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -1613,8 +1609,7 @@ public void testListResourceDescriptorAsyncNextPage() } @Test - public void testListResourceDescriptorAsyncEmpty() - throws ExecutionException, InterruptedException { + void testListResourceDescriptorAsyncEmpty() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ListMonitoredResourceDescriptorsRequest request = @@ -1640,7 +1635,7 @@ public void testListResourceDescriptorAsyncEmpty() } @Test - public void testListResourceDescriptorAsyncWithOptions() + void testListResourceDescriptorAsyncWithOptions() throws ExecutionException, InterruptedException { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); @@ -1674,7 +1669,7 @@ public void testListResourceDescriptorAsyncWithOptions() } @Test - public void testListLogsWithLogNames() { + void testListLogsWithLogNames() { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ImmutableList logNames = ImmutableList.of(LOG_NAME1, LOG_NAME2); @@ -1686,7 +1681,7 @@ public void testListLogsWithLogNames() { } @Test - public void testListLogsWithEmptySet() { + void testListLogsWithEmptySet() { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ImmutableList emptyList = ImmutableList.of(); @@ -1698,7 +1693,7 @@ public void testListLogsWithEmptySet() { } @Test - public void testListLogsNextPageWithLogNames() throws ExecutionException, InterruptedException { + void testListLogsNextPageWithLogNames() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ImmutableList logNames1 = ImmutableList.of(LOG_NAME1, LOG_NAME2); @@ -1715,7 +1710,7 @@ public void testListLogsNextPageWithLogNames() throws ExecutionException, Interr } @Test - public void testListLogsAsyncWithLogNames() throws ExecutionException, InterruptedException { + void testListLogsAsyncWithLogNames() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ImmutableList logNames = ImmutableList.of(LOG_NAME1, LOG_NAME2); @@ -1727,7 +1722,7 @@ public void testListLogsAsyncWithLogNames() throws ExecutionException, Interrupt } @Test - public void testListLogsAsyncWithEmptySet() throws ExecutionException, InterruptedException { + void testListLogsAsyncWithEmptySet() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ImmutableList emptyList = ImmutableList.of(); @@ -1739,8 +1734,7 @@ public void testListLogsAsyncWithEmptySet() throws ExecutionException, Interrupt } @Test - public void testListLogsAsyncNextPageWithLogNames() - throws ExecutionException, InterruptedException { + void testListLogsAsyncNextPageWithLogNames() throws ExecutionException, InterruptedException { EasyMock.replay(rpcFactoryMock); logging = options.getService(); ImmutableList logNames1 = ImmutableList.of(LOG_NAME1, LOG_NAME2); @@ -1757,7 +1751,7 @@ public void testListLogsAsyncNextPageWithLogNames() } @Test - public void testDeleteLog() { + void testDeleteLog() { DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(LOG_NAME_PROJECT_PATH).build(); ApiFuture response = ApiFutures.immediateFuture(Empty.getDefaultInstance()); @@ -1768,7 +1762,7 @@ public void testDeleteLog() { } @Test - public void testDeleteLog_null() { + void testDeleteLog_null() { DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(LOG_NAME_PROJECT_PATH).build(); EasyMock.expect(loggingRpcMock.delete(request)) @@ -1779,7 +1773,7 @@ public void testDeleteLog_null() { } @Test - public void testDeleteLogAsync() throws ExecutionException, InterruptedException { + void testDeleteLogAsync() throws ExecutionException, InterruptedException { DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(LOG_NAME_PROJECT_PATH).build(); ApiFuture response = ApiFutures.immediateFuture(Empty.getDefaultInstance()); @@ -1790,51 +1784,49 @@ public void testDeleteLogAsync() throws ExecutionException, InterruptedException } @Test - public void testDeleteLogBillingDestination() throws ExecutionException, InterruptedException { + void testDeleteLogBillingDestination() throws ExecutionException, InterruptedException { testDeleteByDestination( LOG_NAME, LOG_NAME_BILLING_PATH, LogDestinationName.billingAccount(BILLING), false); } @Test - public void testDeleteLogBillingDestinationAsync() - throws ExecutionException, InterruptedException { + void testDeleteLogBillingDestinationAsync() throws ExecutionException, InterruptedException { testDeleteByDestination( LOG_NAME, LOG_NAME_BILLING_PATH, LogDestinationName.billingAccount(BILLING), true); } @Test - public void testDeleteLogFolderDestination() throws ExecutionException, InterruptedException { + void testDeleteLogFolderDestination() throws ExecutionException, InterruptedException { testDeleteByDestination( LOG_NAME, LOG_NAME_FOLDER_PATH, LogDestinationName.folder(FOLDER), false); } @Test - public void testDeleteLogFolderDestinationAsync() - throws ExecutionException, InterruptedException { + void testDeleteLogFolderDestinationAsync() throws ExecutionException, InterruptedException { testDeleteByDestination( LOG_NAME, LOG_NAME_FOLDER_PATH, LogDestinationName.folder(FOLDER), true); } @Test - public void testDeleteLogOrgDestination() throws ExecutionException, InterruptedException { + void testDeleteLogOrgDestination() throws ExecutionException, InterruptedException { testDeleteByDestination( LOG_NAME, LOG_NAME_ORGANIZATION_PATH, LogDestinationName.organization(ORGANIZATION), false); } @Test - public void testDeleteLogOrgDestinationAsync() throws ExecutionException, InterruptedException { + void testDeleteLogOrgDestinationAsync() throws ExecutionException, InterruptedException { testDeleteByDestination( LOG_NAME, LOG_NAME_ORGANIZATION_PATH, LogDestinationName.organization(ORGANIZATION), true); } @Test - public void testDeleteLogProjectDestination() throws ExecutionException, InterruptedException { + void testDeleteLogProjectDestination() throws ExecutionException, InterruptedException { testDeleteByDestination( LOG_NAME, LOG_NAME_PROJECT_PATH, LogDestinationName.project(PROJECT), false); } @Test - public void testDeleteLogAsync_null() throws ExecutionException, InterruptedException { + void testDeleteLogAsync_null() throws ExecutionException, InterruptedException { DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(LOG_NAME_PROJECT_PATH).build(); EasyMock.expect(loggingRpcMock.delete(request)) @@ -1845,7 +1837,7 @@ public void testDeleteLogAsync_null() throws ExecutionException, InterruptedExce } @Test - public void testWriteLogEntries() { + void testWriteLogEntries() { WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder() .addAllEntries( @@ -1862,7 +1854,7 @@ public void testWriteLogEntries() { } @Test - public void testWriteLogEntriesDoesNotEnableFlushByDefault() { + void testWriteLogEntriesDoesNotEnableFlushByDefault() { WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder() .addAllEntries( @@ -1882,7 +1874,7 @@ public void testWriteLogEntriesDoesNotEnableFlushByDefault() { } @Test - public void testWriteLogEntriesWithSeverityFlushEnabled() { + void testWriteLogEntriesWithSeverityFlushEnabled() { WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder() .addAllEntries( @@ -1899,37 +1891,37 @@ public void testWriteLogEntriesWithSeverityFlushEnabled() { } @Test - public void testWriteLogEntriesWithOptions() { + void testWriteLogEntriesWithOptions() { testWriteLogEntriesWithDestination( PROJECT, LOG_NAME_PROJECT_PATH, LogDestinationName.project(PROJECT)); } @Test - public void testWriteLogEntriesWithDifferentProjectOptions() { + void testWriteLogEntriesWithDifferentProjectOptions() { testWriteLogEntriesWithDestination( PROJECT, LOG_NAME_ANOTHER_PROJECT_PATH, LogDestinationName.project(ANOTHER_PROJECT)); } @Test - public void testWriteLogEntriesWithFolderOptions() { + void testWriteLogEntriesWithFolderOptions() { testWriteLogEntriesWithDestination( PROJECT, LOG_NAME_FOLDER_PATH, LogDestinationName.folder(FOLDER)); } @Test - public void testWriteLogEntriesWithBillingOptions() { + void testWriteLogEntriesWithBillingOptions() { testWriteLogEntriesWithDestination( PROJECT, LOG_NAME_BILLING_PATH, LogDestinationName.billingAccount(BILLING)); } @Test - public void testWriteLogEntriesWithOrganizationOptions() { + void testWriteLogEntriesWithOrganizationOptions() { testWriteLogEntriesWithDestination( PROJECT, LOG_NAME_ORGANIZATION_PATH, LogDestinationName.organization(ORGANIZATION)); } @Test - public void testWriteLogEntriesAsync() { + void testWriteLogEntriesAsync() { WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder() .addAllEntries( @@ -1949,7 +1941,7 @@ public void testWriteLogEntriesAsync() { } @Test - public void testWriteLogEntriesAsyncWithOptions() { + void testWriteLogEntriesAsyncWithOptions() { ImmutableMap labels = ImmutableMap.of("key", "value"); WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder() @@ -1975,7 +1967,7 @@ public void testWriteLogEntriesAsyncWithOptions() { } @Test - public void testListLogEntries() { + void testListLogEntries() { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -1996,7 +1988,7 @@ public void testListLogEntries() { } @Test - public void testListLogEntriesNextPage() throws ExecutionException, InterruptedException { + void testListLogEntriesNextPage() throws ExecutionException, InterruptedException { String cursor1 = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -2043,7 +2035,7 @@ public void testListLogEntriesNextPage() throws ExecutionException, InterruptedE } @Test - public void testListLogEntriesEmpty() { + void testListLogEntriesEmpty() { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -2068,7 +2060,7 @@ public void testListLogEntriesEmpty() { } @Test - public void testListLogEntriesWithOptions() { + void testListLogEntriesWithOptions() { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -2099,7 +2091,7 @@ public void testListLogEntriesWithOptions() { } @Test - public void testListLogEntriesAsync() throws ExecutionException, InterruptedException { + void testListLogEntriesAsync() throws ExecutionException, InterruptedException { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -2123,7 +2115,7 @@ public void testListLogEntriesAsync() throws ExecutionException, InterruptedExce } @Test - public void testListLogEntriesAsyncNextPage() { + void testListLogEntriesAsyncNextPage() { String cursor1 = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -2167,7 +2159,7 @@ public void testListLogEntriesAsyncNextPage() { } @Test - public void testListLogEntriesAsyncEmpty() throws ExecutionException, InterruptedException { + void testListLogEntriesAsyncEmpty() throws ExecutionException, InterruptedException { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -2191,7 +2183,7 @@ public void testListLogEntriesAsyncEmpty() throws ExecutionException, Interrupte } @Test - public void testListLogEntriesAsyncWithOptions() throws ExecutionException, InterruptedException { + void testListLogEntriesAsyncWithOptions() throws ExecutionException, InterruptedException { String cursor = "cursor"; EasyMock.replay(rpcFactoryMock); logging = options.getService(); @@ -2225,7 +2217,7 @@ public void testListLogEntriesAsyncWithOptions() throws ExecutionException, Inte } @Test - public void testFlush() throws InterruptedException { + void testFlush() throws InterruptedException { SettableApiFuture mockRpcResponse = SettableApiFuture.create(); replay(rpcFactoryMock); logging = options.getService(); @@ -2261,7 +2253,7 @@ public void testFlush() throws InterruptedException { } @Test - public void testFlushStress() throws InterruptedException { + void testFlushStress() throws InterruptedException { SettableApiFuture mockRpcResponse = SettableApiFuture.create(); mockRpcResponse.set(null); replay(rpcFactoryMock); @@ -2302,17 +2294,17 @@ public void run() { } @Test - public void testDiagnosticInfoWithNoPartialSuccess() { + void testDiagnosticInfoWithNoPartialSuccess() { testDiagnosticInfoGeneration(false); } @Test - public void testDiagnosticInfoWithPartialSuccess() { + void testDiagnosticInfoWithPartialSuccess() { testDiagnosticInfoGeneration(true); } @Test - public void testPartialSuccessNotOverridenIfPresent() { + void testPartialSuccessNotOverridenIfPresent() { WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder() .addAllEntries( diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingLevelTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingLevelTest.java index 3a701b30e..75da5a7cc 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingLevelTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingLevelTest.java @@ -17,18 +17,15 @@ package com.google.cloud.logging; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.logging.Level; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class LoggingLevelTest { +class LoggingLevelTest { @Test - public void testDebug() { + void testDebug() { LoggingLevel debug = LoggingLevel.DEBUG; assertEquals(Severity.DEBUG, debug.getSeverity()); assertEquals("DEBUG", debug.getName()); @@ -37,7 +34,7 @@ public void testDebug() { } @Test - public void testNotice() { + void testNotice() { LoggingLevel notice = LoggingLevel.NOTICE; assertEquals(Severity.NOTICE, notice.getSeverity()); assertEquals("NOTICE", notice.getName()); @@ -46,7 +43,7 @@ public void testNotice() { } @Test - public void testError() { + void testError() { LoggingLevel error = LoggingLevel.ERROR; assertEquals(Severity.ERROR, error.getSeverity()); assertEquals("ERROR", error.getName()); @@ -55,7 +52,7 @@ public void testError() { } @Test - public void testCritical() { + void testCritical() { LoggingLevel critical = LoggingLevel.CRITICAL; assertEquals(Severity.CRITICAL, critical.getSeverity()); assertEquals("CRITICAL", critical.getName()); @@ -64,7 +61,7 @@ public void testCritical() { } @Test - public void testAlert() { + void testAlert() { LoggingLevel alert = LoggingLevel.ALERT; assertEquals(Severity.ALERT, alert.getSeverity()); assertEquals("ALERT", alert.getName()); @@ -73,7 +70,7 @@ public void testAlert() { } @Test - public void testEmergency() { + void testEmergency() { LoggingLevel emergency = LoggingLevel.EMERGENCY; assertEquals(Severity.EMERGENCY, emergency.getSeverity()); assertEquals("EMERGENCY", emergency.getName()); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingOptionsTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingOptionsTest.java index 989823719..705fe1c37 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingOptionsTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingOptionsTest.java @@ -17,10 +17,10 @@ package com.google.cloud.logging; import static org.easymock.EasyMock.createMock; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThrows; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import com.google.api.gax.batching.BatchingSettings; import com.google.api.gax.batching.FlowControlSettings; @@ -28,12 +28,9 @@ import com.google.cloud.NoCredentials; import com.google.cloud.TransportOptions; import java.time.Duration; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class LoggingOptionsTest { +class LoggingOptionsTest { private static final Boolean DONT_AUTO_POPULATE_METADATA = false; private static final String PROJECT_ID = "fake-project-id"; private static final Long ELEMENTS_TRESHOLD_COUNT = 100L; @@ -43,7 +40,7 @@ public class LoggingOptionsTest { private static final Long MAX_OUTSTANDING_REQUEST_BYTES_COUNT = 104857601L; @Test - public void testNonGrpcTransportOptions() { + void testNonGrpcTransportOptions() { TransportOptions invalidTransport = createMock(TransportOptions.class); assertThrows( IllegalArgumentException.class, @@ -51,7 +48,7 @@ public void testNonGrpcTransportOptions() { } @Test - public void testAutoPopulateMetadataOption() { + void testAutoPopulateMetadataOption() { LoggingOptions actual = LoggingOptions.newBuilder() .setProjectId(PROJECT_ID) @@ -61,24 +58,24 @@ public void testAutoPopulateMetadataOption() { } @Test - public void testAutoPopulateMetadataDefaultOption() { + void testAutoPopulateMetadataDefaultOption() { LoggingOptions actual = LoggingOptions.newBuilder().setProjectId(PROJECT_ID).build(); assertEquals(Boolean.TRUE, actual.getAutoPopulateMetadata()); } @Test - public void testBatchingSettingsDefaultOption() { + void testBatchingSettingsDefaultOption() { LoggingOptions actual = LoggingOptions.newBuilder().setProjectId(PROJECT_ID).build(); - assertNull("Batching settings should be null by default!", actual.getBatchingSettings()); + assertNull(actual.getBatchingSettings(), "Batching settings should be null by default!"); } @Test - public void testBatchingSettingsOption() { + void testBatchingSettingsOption() { verifyBatchingSettings(generateLoggingOptions().getBatchingSettings()); } @Test - public void testBatchingSettingsOptionWithGrpc() { + void testBatchingSettingsOptionWithGrpc() { verifyBatchingSettings( generateLoggingOptions().getService().getOptions().getBatchingSettings()); } diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingTest.java index 5c59c9519..5b40e0ef8 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingTest.java @@ -17,10 +17,10 @@ package com.google.cloud.logging; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.cloud.MonitoredResource; import com.google.cloud.logging.Logging.EntryListOption; @@ -31,12 +31,9 @@ import com.google.common.collect.ImmutableMap; import com.google.logging.v2.ListLogEntriesRequest; import java.util.Map; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class LoggingTest { +class LoggingTest { private static final int PAGE_SIZE = 42; private static final String PAGE_TOKEN = "page token"; @@ -53,7 +50,7 @@ public class LoggingTest { private static final Boolean DO_PARTIAL_SUCCESS = false; @Test - public void testListOption() { + void testListOption() { // page token ListOption listOption = ListOption.pageToken(PAGE_TOKEN); assertEquals(PAGE_TOKEN, listOption.getValue()); @@ -65,7 +62,7 @@ public void testListOption() { } @Test - public void testEntryListOption() { + void testEntryListOption() { EntryListOption listOption = EntryListOption.pageToken(PAGE_TOKEN); assertEquals(PAGE_TOKEN, listOption.getValue()); assertEquals(ListOption.OptionType.PAGE_TOKEN, listOption.getOptionType()); @@ -105,7 +102,7 @@ public void testEntryListOption() { } @Test - public void testFilterUpdate() { + void testFilterUpdate() { Map options = LoggingImpl.optionMap(EntryListOption.filter(FILTER)); assertThat((String) EntryListOption.OptionType.FILTER.get(options)).isEqualTo(FILTER); Map updated = LoggingImpl.updateFilter(options); @@ -117,7 +114,7 @@ public void testFilterUpdate() { } @Test - public void testWriteOption() { + void testWriteOption() { WriteOption writeOption = WriteOption.labels(LABELS); assertEquals(LABELS, writeOption.getValue()); assertEquals(WriteOption.OptionType.LABELS, writeOption.getOptionType()); @@ -140,7 +137,7 @@ public void testWriteOption() { } @Test - public void testWriteOptionWithDestination() { + void testWriteOptionWithDestination() { WriteOption writeOption = WriteOption.destination(LogDestinationName.project(PROJECT_NAME)); LogDestinationName resource = (LogDestinationName) writeOption.getValue(); assertEquals(WriteOption.OptionType.LOG_DESTINATION, writeOption.getOptionType()); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/MetricInfoTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/MetricInfoTest.java index ebedf31ce..4ff30ebc6 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/MetricInfoTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/MetricInfoTest.java @@ -16,15 +16,12 @@ package com.google.cloud.logging; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class MetricInfoTest { +class MetricInfoTest { private static final String NAME = "name"; private static final String FILTER = "logName=projects/my-projectid/logs/syslog"; @@ -36,7 +33,7 @@ public class MetricInfoTest { MetricInfo.newBuilder(NAME, FILTER).setDescription(DESCRIPTION).build(); @Test - public void testOf() { + void testOf() { MetricInfo metricInfo = MetricInfo.of(NAME, FILTER); assertEquals(NAME, metricInfo.getName()); assertEquals(FILTER, metricInfo.getFilter()); @@ -44,14 +41,14 @@ public void testOf() { } @Test - public void testBuilder() { + void testBuilder() { assertEquals(NAME, METRIC_INFO.getName()); assertEquals(FILTER, METRIC_INFO.getFilter()); assertEquals(DESCRIPTION, METRIC_INFO.getDescription()); } @Test - public void testToBuilder() { + void testToBuilder() { compareMetricInfo(METRIC_INFO, METRIC_INFO.toBuilder().build()); MetricInfo metricInfo = METRIC_INFO.toBuilder() @@ -68,7 +65,7 @@ public void testToBuilder() { } @Test - public void testToAndFromPb() { + void testToAndFromPb() { compareMetricInfo(METRIC_INFO, MetricInfo.fromPb(METRIC_INFO.toPb())); MetricInfo metricInfo = MetricInfo.of(NAME, FILTER); compareMetricInfo(metricInfo, MetricInfo.fromPb(metricInfo.toPb())); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/MetricTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/MetricTest.java index 1b894a5cc..f0b1490af 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/MetricTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/MetricTest.java @@ -21,21 +21,18 @@ import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.api.core.ApiFutures; import java.util.concurrent.ExecutionException; -import org.junit.After; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class MetricTest { +class MetricTest { private static final String NAME = "name"; private static final String FILTER = "logName=projects/my-projectid/logs/syslog"; @@ -62,13 +59,13 @@ private void initializeMetric() { metric = new Metric(logging, new MetricInfo.BuilderImpl(METRIC_INFO)); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { verify(logging, serviceMockReturnsOptions); } @Test - public void testBuilder() { + void testBuilder() { initializeExpectedMetric(2); replay(logging); Metric builtMetric = @@ -84,14 +81,14 @@ public void testBuilder() { } @Test - public void testToBuilder() { + void testToBuilder() { initializeExpectedMetric(2); replay(logging); compareMetric(expectedMetric, expectedMetric.toBuilder().build()); } @Test - public void testReload() { + void testReload() { initializeExpectedMetric(2); MetricInfo updatedInfo = METRIC_INFO.toBuilder().setFilter(NEW_FILTER).build(); Metric expectedMetric = @@ -105,7 +102,7 @@ public void testReload() { } @Test - public void testReloadNull() { + void testReloadNull() { initializeExpectedMetric(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.getMetric(NAME)).andReturn(null); @@ -115,7 +112,7 @@ public void testReloadNull() { } @Test - public void testReloadAsync() throws ExecutionException, InterruptedException { + void testReloadAsync() throws ExecutionException, InterruptedException { initializeExpectedMetric(2); MetricInfo updatedInfo = METRIC_INFO.toBuilder().setFilter(NEW_FILTER).build(); Metric expectedMetric = @@ -129,7 +126,7 @@ public void testReloadAsync() throws ExecutionException, InterruptedException { } @Test - public void testReloadAsyncNull() throws ExecutionException, InterruptedException { + void testReloadAsyncNull() throws ExecutionException, InterruptedException { initializeExpectedMetric(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.getMetricAsync(NAME)).andReturn(ApiFutures.immediateFuture(null)); @@ -139,7 +136,7 @@ public void testReloadAsyncNull() throws ExecutionException, InterruptedExceptio } @Test - public void testUpdate() { + void testUpdate() { initializeExpectedMetric(2); MetricInfo updatedInfo = METRIC_INFO.toBuilder().setFilter(NEW_FILTER).build(); Metric expectedMetric = @@ -153,7 +150,7 @@ public void testUpdate() { } @Test - public void testUpdateAsync() throws ExecutionException, InterruptedException { + void testUpdateAsync() throws ExecutionException, InterruptedException { initializeExpectedMetric(2); MetricInfo updatedInfo = METRIC_INFO.toBuilder().setFilter(NEW_FILTER).build(); Metric expectedMetric = @@ -168,7 +165,7 @@ public void testUpdateAsync() throws ExecutionException, InterruptedException { } @Test - public void testDeleteTrue() { + void testDeleteTrue() { initializeExpectedMetric(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.deleteMetric(NAME)).andReturn(true); @@ -178,7 +175,7 @@ public void testDeleteTrue() { } @Test - public void testDeleteFalse() { + void testDeleteFalse() { initializeExpectedMetric(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.deleteMetric(NAME)).andReturn(false); @@ -188,7 +185,7 @@ public void testDeleteFalse() { } @Test - public void testDeleteAsyncTrue() throws ExecutionException, InterruptedException { + void testDeleteAsyncTrue() throws ExecutionException, InterruptedException { initializeExpectedMetric(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.deleteMetricAsync(NAME)).andReturn(ApiFutures.immediateFuture(true)); @@ -198,7 +195,7 @@ public void testDeleteAsyncTrue() throws ExecutionException, InterruptedExceptio } @Test - public void testDeleteAsyncFalse() throws ExecutionException, InterruptedException { + void testDeleteAsyncFalse() throws ExecutionException, InterruptedException { initializeExpectedMetric(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.deleteMetricAsync(NAME)).andReturn(ApiFutures.immediateFuture(false)); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/MonitoredResourceUtilTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/MonitoredResourceUtilTest.java index 57c1ffa4b..11b038572 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/MonitoredResourceUtilTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/MonitoredResourceUtilTest.java @@ -21,18 +21,15 @@ import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import com.google.cloud.MonitoredResource; import com.google.common.collect.ImmutableMap; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class MonitoredResourceUtilTest { +class MonitoredResourceUtilTest { private static final String MOCKED_PROJECT_ID = "mocked-project-id"; private static final String MOCKED_ZONE = "mocked-zone-id"; private static final String MOCKED_QUALIFIED_ZONE = @@ -44,21 +41,21 @@ public class MonitoredResourceUtilTest { private ResourceTypeEnvironmentGetter getterMock; - @Before - public void setup() { + @BeforeEach + void setup() { getterMock = createMock(ResourceTypeEnvironmentGetter.class); expect(getterMock.getAttribute("project/project-id")).andReturn(MOCKED_PROJECT_ID).once(); expect(getterMock.getAttribute("")).andReturn(MOCKED_NON_EMPTY).once(); MonitoredResourceUtil.setEnvironmentGetter(getterMock); } - @After - public void teardown() { + @AfterEach + void teardown() { verify(getterMock); } @Test - public void testResourceTypeGlobal() { + void testResourceTypeGlobal() { final ImmutableMap expectedLabels = ImmutableMap.of("project_id", MonitoredResourceUtilTest.MOCKED_PROJECT_ID); @@ -74,7 +71,7 @@ public void testResourceTypeGlobal() { } @Test - public void testGetResourceWithParameters() { + void testGetResourceWithParameters() { final String myProjectId = "my-project-id"; final String myResourceType = "my-resource-type"; final ImmutableMap expectedLabels = ImmutableMap.of("project_id", myProjectId); @@ -92,7 +89,7 @@ public void testGetResourceWithParameters() { } @Test - public void testResourceTypeGCEInstance() { + void testResourceTypeGCEInstance() { final String mockedInstanceId = "1234567890abcdefg"; final ImmutableMap expectedLabels = ImmutableMap.of( @@ -124,7 +121,7 @@ public void testResourceTypeGCEInstance() { * contains a value other than the mocked constant */ @Test - public void testResourceTypeK8sContainer() { + void testResourceTypeK8sContainer() { final String mockedClusterName = "mocked-cluster-1"; final String mockedNamespaceName = "default"; final String mockedPodName = "mocked-pod"; @@ -166,7 +163,7 @@ private void setupCommonGAEMocks(String mockedModuleId, String mockedVersionId) } @Test - public void testResourceTypeGAEStandardEnvironment() { + void testResourceTypeGAEStandardEnvironment() { final String mockedModuleId = "mocked-module-id"; final String mockedVersionId = "mocked-version-id"; final ImmutableMap expectedLabels = @@ -194,7 +191,7 @@ public void testResourceTypeGAEStandardEnvironment() { } @Test - public void testResourceTypeGAEFlexibleEnvironment() { + void testResourceTypeGAEFlexibleEnvironment() { final String mockedModuleId = "mocked-module-id"; final String mockedVersionId = "mocked-version-id"; final ImmutableMap expectedLabels = @@ -224,7 +221,7 @@ public void testResourceTypeGAEFlexibleEnvironment() { } @Test - public void testResourceTypeCloudFunction() { + void testResourceTypeCloudFunction() { final String mockedFunctionName = "mocked-function-name"; final ImmutableMap expectedLabels = ImmutableMap.of( @@ -255,7 +252,7 @@ public void testResourceTypeCloudFunction() { } @Test - public void testResourceTypeCloudRun() { + void testResourceTypeCloudRun() { final String mockedRevisionName = "mocked-revision-name"; final String mockedServiceName = "mocked-service-name"; final String mockedConfigurationName = "mocked-config-name"; @@ -288,7 +285,7 @@ public void testResourceTypeCloudRun() { } @Test - public void testResourceTypeCloudRunJob() { + void testResourceTypeCloudRunJob() { final String mockedJobName = "mocked-job-name"; final ImmutableMap expectedLabels = ImmutableMap.of( diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/OperationTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/OperationTest.java index 9ddccafac..f1f964e7b 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/OperationTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/OperationTest.java @@ -16,16 +16,13 @@ package com.google.cloud.logging; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class OperationTest { +class OperationTest { private static final String ID = "id"; private static final String PRODUCER = "producer"; @@ -35,7 +32,7 @@ public class OperationTest { Operation.newBuilder(ID, PRODUCER).setFirst(FIRST).setLast(LAST).build(); @Test - public void testBuilder() { + void testBuilder() { assertEquals(ID, OPERATION.getId()); assertEquals(PRODUCER, OPERATION.getProducer()); assertTrue(OPERATION.first()); @@ -43,7 +40,7 @@ public void testBuilder() { } @Test - public void testToBuilder() { + void testToBuilder() { compareLogOperation(OPERATION, OPERATION.toBuilder().build()); Operation operation = OPERATION.toBuilder() @@ -62,7 +59,7 @@ public void testToBuilder() { } @Test - public void testOf() { + void testOf() { Operation operation = Operation.of(ID, PRODUCER); assertEquals(ID, operation.getId()); assertEquals(PRODUCER, operation.getProducer()); @@ -71,7 +68,7 @@ public void testOf() { } @Test - public void testToAndFromPb() { + void testToAndFromPb() { compareLogOperation(OPERATION, Operation.fromPb(OPERATION.toPb())); Operation operation = Operation.of(ID, PRODUCER); compareLogOperation(operation, Operation.fromPb(operation.toPb())); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/OptionTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/OptionTest.java index 275f5fb1b..4a154e464 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/OptionTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/OptionTest.java @@ -16,19 +16,16 @@ package com.google.cloud.logging; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import com.google.cloud.logging.Logging.ListOption; import com.google.cloud.logging.Option.OptionType; import com.google.common.testing.EqualsTester; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class OptionTest { +class OptionTest { private static final OptionType OPTION_TYPE = ListOption.OptionType.PAGE_SIZE; private static final OptionType ANOTHER_OPTION_TYPE = ListOption.OptionType.PAGE_TOKEN; @@ -40,7 +37,7 @@ public class OptionTest { private static final Option OPTION_NOT_EQUALS2 = new Option(ANOTHER_OPTION_TYPE, VALUE) {}; @Test - public void testEquals() { + void testEquals() { new EqualsTester() .addEqualityGroup(OPTION, OPTION_EQUALS) .addEqualityGroup(OPTION_NOT_EQUALS1) @@ -49,7 +46,7 @@ public void testEquals() { } @Test - public void testConstructor() { + void testConstructor() { assertEquals(OPTION_TYPE, OPTION.getOptionType()); assertEquals(VALUE, OPTION.getValue()); Option option = new Option(OPTION_TYPE, null) {}; @@ -57,14 +54,14 @@ public void testConstructor() { assertNull(option.getValue()); try { new Option(null, VALUE) {}; - Assert.fail(); + Assertions.fail(); } catch (NullPointerException expected) { } } @Test - public void testListOption() { + void testListOption() { Option option = ListOption.pageSize(42); assertEquals(ListOption.OptionType.PAGE_SIZE, option.getOptionType()); assertEquals(42, option.getValue()); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/PayloadTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/PayloadTest.java index ac2e466df..0a270bdd7 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/PayloadTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/PayloadTest.java @@ -17,7 +17,7 @@ package com.google.cloud.logging; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import com.google.cloud.logging.Payload.JsonPayload; import com.google.cloud.logging.Payload.ProtoPayload; @@ -31,12 +31,9 @@ import com.google.protobuf.Value; import java.util.HashMap; import java.util.Map; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class PayloadTest { +class PayloadTest { private static final String STRING_DATA = "string"; private static final Value NULL_VALUE = @@ -103,7 +100,7 @@ public class PayloadTest { private static final ProtoPayload PROTO_PAYLOAD = ProtoPayload.of(PROTO_DATA); @Test - public void testOf() { + void testOf() { assertEquals(Payload.Type.STRING, STRING_PAYLOAD.getType()); assertEquals(STRING_DATA, STRING_PAYLOAD.getData()); assertEquals(Payload.Type.JSON, JSON_PAYLOAD.getType()); @@ -118,7 +115,7 @@ public void testOf() { } @Test - public void testToAndFromPb() { + void testToAndFromPb() { Payload payload = Payload.fromPb(STRING_PAYLOAD.toPb().build()); assertThat(payload).isInstanceOf(StringPayload.class); comparePayload(STRING_PAYLOAD, payload); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/SerializationTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/SerializationTest.java index 144436c1a..0a916c70c 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/SerializationTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/SerializationTest.java @@ -36,11 +36,8 @@ import com.google.protobuf.Any; import com.google.protobuf.Empty; import java.io.Serializable; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -@RunWith(JUnit4.class) -public class SerializationTest extends BaseSerializationTest { +class SerializationTest extends BaseSerializationTest { private static final Logging LOGGING = LoggingOptions.newBuilder() diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/SinkInfoTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/SinkInfoTest.java index 8859b906d..a80800ba0 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/SinkInfoTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/SinkInfoTest.java @@ -17,9 +17,9 @@ package com.google.cloud.logging; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.fail; import com.google.cloud.logging.SinkInfo.Destination; import com.google.cloud.logging.SinkInfo.Destination.BucketDestination; @@ -27,12 +27,9 @@ import com.google.cloud.logging.SinkInfo.Destination.LoggingBucketDestination; import com.google.cloud.logging.SinkInfo.Destination.TopicDestination; import com.google.cloud.logging.SinkInfo.VersionFormat; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class SinkInfoTest { +class SinkInfoTest { private static final String NAME = "name"; private static final String FILTER = @@ -61,13 +58,13 @@ public class SinkInfoTest { .build(); @Test - public void testOfBucketDestination() { + void testOfBucketDestination() { assertEquals(Destination.Type.BUCKET, BUCKET_DESTINATION.getType()); assertEquals("bucket", BUCKET_DESTINATION.getBucket()); } @Test - public void testOfDatasetDestination() { + void testOfDatasetDestination() { assertEquals(Destination.Type.DATASET, DATASET_DESTINATION.getType()); assertEquals("project", DATASET_DESTINATION.getProject()); assertEquals("dataset", DATASET_DESTINATION.getDataset()); @@ -77,7 +74,7 @@ public void testOfDatasetDestination() { } @Test - public void testOfTopicDestination() { + void testOfTopicDestination() { assertEquals(Destination.Type.TOPIC, TOPIC_DESTINATION.getType()); assertEquals("project", TOPIC_DESTINATION.getProject()); assertEquals("topic", TOPIC_DESTINATION.getTopic()); @@ -87,7 +84,7 @@ public void testOfTopicDestination() { } @Test - public void testOfLoggingBucketDestination() { + void testOfLoggingBucketDestination() { assertEquals(Destination.Type.LOGGING_BUCKET, LOGGING_BUCKET_DESTINATION.getType()); assertEquals("project", LOGGING_BUCKET_DESTINATION.getProject()); assertEquals("location", LOGGING_BUCKET_DESTINATION.getLocation()); @@ -100,7 +97,7 @@ public void testOfLoggingBucketDestination() { } @Test - public void testToAndFromPbDestination() { + void testToAndFromPbDestination() { BucketDestination bucketDestination = Destination.fromPb(BUCKET_DESTINATION.toPb("other")); assertEquals(Destination.Type.BUCKET, bucketDestination.getType()); assertEquals("bucket", bucketDestination.getBucket()); @@ -133,7 +130,7 @@ public void testToAndFromPbDestination() { } @Test - public void testToAndFromPbDestination_noProjectId() { + void testToAndFromPbDestination_noProjectId() { DatasetDestination datasetDestination = DatasetDestination.fromPb(DatasetDestination.of("dataset").toPb("project")); compareDatasetDestination(DATASET_DESTINATION, datasetDestination); @@ -150,7 +147,7 @@ public void testToAndFromPbDestination_noProjectId() { } @Test - public void testBuilder() { + void testBuilder() { assertEquals(NAME, BUCKET_SINK_INFO.getName()); assertEquals(BUCKET_DESTINATION, BUCKET_SINK_INFO.getDestination()); assertEquals(FILTER, BUCKET_SINK_INFO.getFilter()); @@ -166,7 +163,7 @@ public void testBuilder() { } @Test - public void testToBuilder() { + void testToBuilder() { compareSinkInfo(BUCKET_SINK_INFO, BUCKET_SINK_INFO.toBuilder().build()); compareSinkInfo(DATASET_SINK_INFO, DATASET_SINK_INFO.toBuilder().build()); compareSinkInfo(TOPIC_SINK_INFO, TOPIC_SINK_INFO.toBuilder().build()); @@ -192,7 +189,7 @@ public void testToBuilder() { } @Test - public void testToAndFromPb() { + void testToAndFromPb() { compareSinkInfo(BUCKET_SINK_INFO, SinkInfo.fromPb(BUCKET_SINK_INFO.toPb("project"))); compareSinkInfo(DATASET_SINK_INFO, SinkInfo.fromPb(DATASET_SINK_INFO.toPb("project"))); compareSinkInfo(TOPIC_SINK_INFO, SinkInfo.fromPb(TOPIC_SINK_INFO.toPb("project"))); @@ -206,7 +203,7 @@ public void testToAndFromPb() { } @Test - public void testToAndFromPb_noProjectId() { + void testToAndFromPb_noProjectId() { DatasetDestination datasetDestination = DatasetDestination.of("dataset"); SinkInfo sinkInfo = SinkInfo.newBuilder(NAME, DATASET_DESTINATION).setVersionFormat(VERSION).build(); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/SinkTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/SinkTest.java index a47012f82..54d0637a3 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/SinkTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/SinkTest.java @@ -21,23 +21,20 @@ import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.api.core.ApiFutures; import com.google.cloud.logging.SinkInfo.Destination.BucketDestination; import com.google.cloud.logging.SinkInfo.Destination.DatasetDestination; import com.google.cloud.logging.SinkInfo.VersionFormat; import java.util.concurrent.ExecutionException; -import org.junit.After; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class SinkTest { +class SinkTest { private static final String NAME = "sink"; private static final String FILTER = @@ -70,13 +67,13 @@ private void initializeSink() { sink = new Sink(logging, new SinkInfo.BuilderImpl(SINK_INFO)); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { verify(logging, serviceMockReturnsOptions); } @Test - public void testBuilder() { + void testBuilder() { initializeExpectedSink(2); replay(logging); Sink builtSink = @@ -93,14 +90,14 @@ public void testBuilder() { } @Test - public void testToBuilder() { + void testToBuilder() { initializeExpectedSink(2); replay(logging); compareSink(expectedSink, expectedSink.toBuilder().build()); } @Test - public void testReload() { + void testReload() { initializeExpectedSink(2); SinkInfo updatedInfo = SINK_INFO.toBuilder().setFilter(NEW_FILTER).build(); Sink expectedSink = new Sink(serviceMockReturnsOptions, new SinkInfo.BuilderImpl(updatedInfo)); @@ -113,7 +110,7 @@ public void testReload() { } @Test - public void testReloadNull() { + void testReloadNull() { initializeExpectedSink(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.getSink(NAME)).andReturn(null); @@ -123,7 +120,7 @@ public void testReloadNull() { } @Test - public void testReloadAsync() throws ExecutionException, InterruptedException { + void testReloadAsync() throws ExecutionException, InterruptedException { initializeExpectedSink(2); SinkInfo updatedInfo = SINK_INFO.toBuilder().setFilter(NEW_FILTER).build(); Sink expectedSink = new Sink(serviceMockReturnsOptions, new SinkInfo.BuilderImpl(updatedInfo)); @@ -136,7 +133,7 @@ public void testReloadAsync() throws ExecutionException, InterruptedException { } @Test - public void testReloadAsyncNull() throws ExecutionException, InterruptedException { + void testReloadAsyncNull() throws ExecutionException, InterruptedException { initializeExpectedSink(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.getSinkAsync(NAME)).andReturn(ApiFutures.immediateFuture(null)); @@ -146,7 +143,7 @@ public void testReloadAsyncNull() throws ExecutionException, InterruptedExceptio } @Test - public void testUpdate() { + void testUpdate() { initializeExpectedSink(2); SinkInfo updatedInfo = SINK_INFO.toBuilder().setFilter(NEW_FILTER).build(); Sink expectedSink = new Sink(serviceMockReturnsOptions, new SinkInfo.BuilderImpl(updatedInfo)); @@ -159,7 +156,7 @@ public void testUpdate() { } @Test - public void testUpdateAsync() throws ExecutionException, InterruptedException { + void testUpdateAsync() throws ExecutionException, InterruptedException { initializeExpectedSink(2); SinkInfo updatedInfo = SINK_INFO.toBuilder().setFilter(NEW_FILTER).build(); Sink expectedSink = new Sink(serviceMockReturnsOptions, new SinkInfo.BuilderImpl(updatedInfo)); @@ -172,7 +169,7 @@ public void testUpdateAsync() throws ExecutionException, InterruptedException { } @Test - public void testDeleteTrue() { + void testDeleteTrue() { initializeExpectedSink(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.deleteSink(NAME)).andReturn(true); @@ -182,7 +179,7 @@ public void testDeleteTrue() { } @Test - public void testDeleteFalse() { + void testDeleteFalse() { initializeExpectedSink(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.deleteSink(NAME)).andReturn(false); @@ -192,7 +189,7 @@ public void testDeleteFalse() { } @Test - public void testDeleteAsyncTrue() throws ExecutionException, InterruptedException { + void testDeleteAsyncTrue() throws ExecutionException, InterruptedException { initializeExpectedSink(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.deleteSinkAsync(NAME)).andReturn(ApiFutures.immediateFuture(true)); @@ -202,7 +199,7 @@ public void testDeleteAsyncTrue() throws ExecutionException, InterruptedExceptio } @Test - public void testDeleteAsyncFalse() throws ExecutionException, InterruptedException { + void testDeleteAsyncFalse() throws ExecutionException, InterruptedException { initializeExpectedSink(1); expect(logging.getOptions()).andReturn(mockOptions); expect(logging.deleteSinkAsync(NAME)).andReturn(ApiFutures.immediateFuture(false)); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/SourceLocationTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/SourceLocationTest.java index e7488c075..41ddac832 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/SourceLocationTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/SourceLocationTest.java @@ -16,15 +16,12 @@ package com.google.cloud.logging; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class SourceLocationTest { +class SourceLocationTest { private static final String FILE = "file"; private static final Long LINE = 42L; @@ -33,14 +30,14 @@ public class SourceLocationTest { SourceLocation.newBuilder().setFile(FILE).setLine(LINE).setFunction(FUNCTION).build(); @Test - public void testBuilder() { + void testBuilder() { assertEquals(FILE, SOURCE_LOCATION.getFile()); assertEquals(LINE, SOURCE_LOCATION.getLine()); assertEquals(FUNCTION, SOURCE_LOCATION.getFunction()); } @Test - public void testToBuilder() { + void testToBuilder() { compareSourceLocation(SOURCE_LOCATION, SOURCE_LOCATION.toBuilder().build()); SourceLocation sourceLocation = SOURCE_LOCATION.toBuilder() @@ -57,12 +54,12 @@ public void testToBuilder() { } @Test - public void testToAndFromPb() { + void testToAndFromPb() { compareSourceLocation(SOURCE_LOCATION, SourceLocation.fromPb(SOURCE_LOCATION.toPb())); } @Test - public void testFromCurrentContext() { + void testFromCurrentContext() { StackTraceElement expectedData = new Exception().getStackTrace()[0]; SourceLocation data = SourceLocation.fromCurrentContext(); assertEquals(expectedData.getFileName(), data.getFile()); @@ -75,7 +72,7 @@ public void testFromCurrentContext() { } @Test - public void testFromCurrentContextWithExclusionList() { + void testFromCurrentContextWithExclusionList() { StackTraceElement expectedData = new Exception().getStackTrace()[0]; SourceLocation data = SourceLocation.fromCurrentContext(LoggingImpl.class.getName()); assertEquals(expectedData.getFileName(), data.getFile()); @@ -88,7 +85,7 @@ public void testFromCurrentContextWithExclusionList() { } @Test - public void testFromCurrentContextWithVeryLargeLevel() { + void testFromCurrentContextWithVeryLargeLevel() { SourceLocation data = SourceLocation.fromCurrentContext("com.google", "sun", "java", "jdk", "org"); assertNull(data); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/TailLogEntriesTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/TailLogEntriesTest.java index 4c7cab8e8..252d025c8 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/TailLogEntriesTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/TailLogEntriesTest.java @@ -17,7 +17,7 @@ package com.google.cloud.logging; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; import com.google.api.gax.rpc.BidiStream; import com.google.cloud.ServiceOptions; @@ -29,12 +29,9 @@ import com.google.protobuf.Duration; import com.google.protobuf.util.Durations; import org.easymock.EasyMock; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class TailLogEntriesTest { +class TailLogEntriesTest { private static final String WINDOW = "20s"; private static final Duration WINDOW_DURATION = Durations.fromSeconds(20); private static final String FILTER = "severity iterator = logging .listMonitoredResourceDescriptors(Logging.ListOption.pageSize(100)) @@ -54,7 +54,7 @@ public void testListMonitoredResourceDescriptors() { } @Test - public void testCreateGetUpdateAndDeleteMetric() { + void testCreateGetUpdateAndDeleteMetric() { String name = formatForTest("test-create-get-update-metric"); MetricInfo metricInfo = MetricInfo.newBuilder(name, "severity>=ERROR").setDescription("description").build(); @@ -77,7 +77,7 @@ public void testCreateGetUpdateAndDeleteMetric() { } @Test - public void testUpdateNonExistingMetric() { + void testUpdateNonExistingMetric() { String name = formatForTest("test-update-non-existing-metric"); MetricInfo metricInfo = MetricInfo.newBuilder(name, "severity>=ERROR").setDescription("description").build(); @@ -90,7 +90,7 @@ public void testUpdateNonExistingMetric() { } @Test - public void testListMetrics() throws InterruptedException { + void testListMetrics() throws InterruptedException { String firstName = formatForTest("test-list-metrics-1"); String secondName = formatForTest("test-list-metrics-2"); Metric firstMetric = logging.create(MetricInfo.of(firstName, "severity>=ERROR")); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITSinkTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITSinkTest.java index ee429a094..9af31cb9d 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITSinkTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITSinkTest.java @@ -17,12 +17,12 @@ package com.google.cloud.logging.it; import static com.google.cloud.logging.testing.RemoteLoggingHelper.formatForTest; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import com.google.api.gax.paging.Page; import com.google.cloud.logging.BaseSystemTest; @@ -33,13 +33,13 @@ import com.google.common.collect.Sets; import java.util.Iterator; import java.util.Set; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; -public class ITSinkTest extends BaseSystemTest { +class ITSinkTest extends BaseSystemTest { - @BeforeClass + @BeforeAll public static void setUp() { // Cleanup all stucked sinks if any Logging.ListOption[] options = {Logging.ListOption.pageSize(50)}; @@ -56,8 +56,8 @@ public static void setUp() { } @Test - @Ignore - public void testCreateGetUpdateAndDeleteSink() { + @Disabled + void testCreateGetUpdateAndDeleteSink() { String name = formatForTest("test-create-get-update-sink"); SinkInfo sinkInfo = SinkInfo.newBuilder(name, SinkInfo.Destination.DatasetDestination.of("dataset")) @@ -81,7 +81,7 @@ public void testCreateGetUpdateAndDeleteSink() { } @Test - public void testUpdateNonExistingSink() { + void testUpdateNonExistingSink() { String name = formatForTest("test-update-non-existing-sink"); SinkInfo sinkInfo = SinkInfo.newBuilder(name, SinkInfo.Destination.DatasetDestination.of("dataset")) @@ -98,7 +98,7 @@ public void testUpdateNonExistingSink() { } @Test - public void testListSinks() throws InterruptedException { + void testListSinks() throws InterruptedException { String firstName = formatForTest("test-list-sinks-1"); String secondName = formatForTest("test-list-sinks-2"); Sink firstSink = diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTailLogsTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTailLogsTest.java index 3ef0f1fb7..a67725b63 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTailLogsTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTailLogsTest.java @@ -17,31 +17,36 @@ package com.google.cloud.logging.it; import static com.google.cloud.logging.testing.RemoteLoggingHelper.formatForTest; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.cloud.MonitoredResource; import com.google.cloud.logging.*; import com.google.cloud.logging.Logging.TailOption; import com.google.common.collect.ImmutableList; import java.util.ArrayList; -import org.junit.AfterClass; -import org.junit.Ignore; -import org.junit.Test; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; -public class ITTailLogsTest extends BaseSystemTest { +class ITTailLogsTest extends BaseSystemTest { private static final String LOG_ID = formatForTest("test-tail-log-entries-log"); private static final MonitoredResource GLOBAL_RESOURCE = MonitoredResource.newBuilder("global").build(); - @AfterClass + @AfterAll public static void cleanUpLogs() throws InterruptedException { assertTrue(cleanupLog(LOG_ID)); } - @Ignore - @Test(timeout = 120_000) // Note: the test should not take longer than 2 min + @Disabled + @Test + @Timeout( + value = 120_000, + unit = TimeUnit.MILLISECONDS) // Note: the test should not take longer than 2 min public void testTailLogEntries() throws InterruptedException { LogEntry testLogEntry = LogEntry.newBuilder(Payload.StringPayload.of("stringPayload1")) diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTracingLogsTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTracingLogsTest.java index aea975c5e..c08f3964a 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTracingLogsTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTracingLogsTest.java @@ -18,7 +18,7 @@ import static com.google.cloud.logging.testing.RemoteLoggingHelper.formatForTest; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; import com.google.cloud.MonitoredResource; import com.google.cloud.logging.*; @@ -35,13 +35,15 @@ import io.opentelemetry.sdk.trace.SpanProcessor; import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor; import java.util.Iterator; -import org.junit.After; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; -@Ignore -public class ITTracingLogsTest extends BaseSystemTest { +@Disabled +class ITTracingLogsTest extends BaseSystemTest { private static final String LOG_ID = formatForTest("test-write-log-entries-log"); private static final Payload.StringPayload STRING_PAYLOAD = @@ -76,7 +78,7 @@ public class ITTracingLogsTest extends BaseSystemTest { private static LogEntry otelEntry; private static LogName logName; - @BeforeClass + @BeforeAll public static void prepareLogs() throws InterruptedException { LoggingOptions loggingOptions = logging.getOptions(); logName = LogName.ofProjectLogName(loggingOptions.getProjectId(), LOG_ID); @@ -113,12 +115,13 @@ public static void prepareLogs() throws InterruptedException { tracer = openTelemetrySdk.getTracer("ContextTest"); } - @After - public void cleanUpLogs() throws InterruptedException { + @AfterEach + void cleanUpLogs() throws InterruptedException { assertTrue(cleanupLog(LOG_ID)); } - @Test(timeout = 600_000) + @Test + @Timeout(value = 600_000, unit = TimeUnit.MILLISECONDS) public void testDetectW3CTraceId() throws InterruptedException { // Loads w3c tracing context and writes a log entry Context.Builder builder = Context.newBuilder(); @@ -140,7 +143,8 @@ public void testDetectW3CTraceId() throws InterruptedException { assertEquals(true, entry.getTraceSampled()); } - @Test(timeout = 600_000) + @Test + @Timeout(value = 600_000, unit = TimeUnit.MILLISECONDS) public void testDetectXCTCTraceId() throws InterruptedException { // Loads cloud trace context and writes a log entry Context.Builder builder = Context.newBuilder(); @@ -163,7 +167,8 @@ public void testDetectXCTCTraceId() throws InterruptedException { assertEquals(true, entry.getTraceSampled()); } - @Test(timeout = 600_000) + @Test + @Timeout(value = 600_000, unit = TimeUnit.MILLISECONDS) public void testDetectOtelTraceId() throws InterruptedException { // Writes a log entry in open telemetry context writeLogEntryWithOtelContext(otelEntry); @@ -182,7 +187,8 @@ public void testDetectOtelTraceId() throws InterruptedException { assertEquals(isSampled, entry.getTraceSampled()); } - @Test(timeout = 600_000) + @Test + @Timeout(value = 600_000, unit = TimeUnit.MILLISECONDS) public void testW3CTraceIdWithOtelContext() throws InterruptedException { // Writes a log entry with W3C context and Open Telemetry context Context.Builder builder = Context.newBuilder(); @@ -204,7 +210,8 @@ public void testW3CTraceIdWithOtelContext() throws InterruptedException { assertEquals(isSampled, entry.getTraceSampled()); } - @Test(timeout = 600_000) + @Test + @Timeout(value = 600_000, unit = TimeUnit.MILLISECONDS) public void testXCTCTraceIdWithOtelContext() throws InterruptedException { // Writes a log entry with cloud trace context and Open Telemetry context Context.Builder builder = Context.newBuilder(); diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java index e4a8e8770..9c9ba5b6a 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java @@ -106,21 +106,21 @@ import java.util.UUID; import java.util.concurrent.ExecutionException; import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; @Generated("by gapic-generator-java") -public class ConfigClientTest { +class ConfigClientTest { private static MockConfigServiceV2 mockConfigServiceV2; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private ConfigClient client; - @BeforeClass + @BeforeAll public static void startStaticServer() { mockConfigServiceV2 = new MockConfigServiceV2(); mockServiceHelper = @@ -129,13 +129,13 @@ public static void startStaticServer() { mockServiceHelper.start(); } - @AfterClass + @AfterAll public static void stopServer() { mockServiceHelper.stop(); } - @Before - public void setUp() throws IOException { + @BeforeEach + void setUp() throws IOException { mockServiceHelper.reset(); channelProvider = mockServiceHelper.createChannelProvider(); ConfigSettings settings = @@ -146,13 +146,13 @@ public void setUp() throws IOException { client = ConfigClient.create(settings); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { client.close(); } @Test - public void listBucketsTest() throws Exception { + void listBucketsTest() throws Exception { LogBucket responsesElement = LogBucket.newBuilder().build(); ListBucketsResponse expectedResponse = ListBucketsResponse.newBuilder() @@ -168,22 +168,22 @@ public void listBucketsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listBucketsExceptionTest() throws Exception { + void listBucketsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -191,14 +191,14 @@ public void listBucketsExceptionTest() throws Exception { BillingAccountLocationName parent = BillingAccountLocationName.of("[BILLING_ACCOUNT]", "[LOCATION]"); client.listBuckets(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listBucketsTest2() throws Exception { + void listBucketsTest2() throws Exception { LogBucket responsesElement = LogBucket.newBuilder().build(); ListBucketsResponse expectedResponse = ListBucketsResponse.newBuilder() @@ -213,36 +213,36 @@ public void listBucketsTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listBucketsExceptionTest2() throws Exception { + void listBucketsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); client.listBuckets(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listBucketsTest3() throws Exception { + void listBucketsTest3() throws Exception { LogBucket responsesElement = LogBucket.newBuilder().build(); ListBucketsResponse expectedResponse = ListBucketsResponse.newBuilder() @@ -257,36 +257,36 @@ public void listBucketsTest3() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listBucketsExceptionTest3() throws Exception { + void listBucketsExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); client.listBuckets(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listBucketsTest4() throws Exception { + void listBucketsTest4() throws Exception { LogBucket responsesElement = LogBucket.newBuilder().build(); ListBucketsResponse expectedResponse = ListBucketsResponse.newBuilder() @@ -301,36 +301,36 @@ public void listBucketsTest4() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listBucketsExceptionTest4() throws Exception { + void listBucketsExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); client.listBuckets(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listBucketsTest5() throws Exception { + void listBucketsTest5() throws Exception { LogBucket responsesElement = LogBucket.newBuilder().build(); ListBucketsResponse expectedResponse = ListBucketsResponse.newBuilder() @@ -345,36 +345,36 @@ public void listBucketsTest5() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listBucketsExceptionTest5() throws Exception { + void listBucketsExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listBuckets(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getBucketTest() throws Exception { + void getBucketTest() throws Exception { LogBucket expectedResponse = LogBucket.newBuilder() .setName( @@ -401,21 +401,21 @@ public void getBucketTest() throws Exception { .build(); LogBucket actualResponse = client.getBucket(request); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetBucketRequest actualRequest = ((GetBucketRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getBucketExceptionTest() throws Exception { + void getBucketExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -427,14 +427,14 @@ public void getBucketExceptionTest() throws Exception { .toString()) .build(); client.getBucket(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createBucketAsyncTest() throws Exception { + void createBucketAsyncTest() throws Exception { LogBucket expectedResponse = LogBucket.newBuilder() .setName( @@ -467,23 +467,23 @@ public void createBucketAsyncTest() throws Exception { .build(); LogBucket actualResponse = client.createBucketAsyncAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateBucketRequest actualRequest = ((CreateBucketRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getBucketId(), actualRequest.getBucketId()); - Assert.assertEquals(request.getBucket(), actualRequest.getBucket()); - Assert.assertTrue( + Assertions.assertEquals(request.getParent(), actualRequest.getParent()); + Assertions.assertEquals(request.getBucketId(), actualRequest.getBucketId()); + Assertions.assertEquals(request.getBucket(), actualRequest.getBucket()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createBucketAsyncExceptionTest() throws Exception { + void createBucketAsyncExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -495,16 +495,17 @@ public void createBucketAsyncExceptionTest() throws Exception { .setBucket(LogBucket.newBuilder().build()) .build(); client.createBucketAsyncAsync(request).get(); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assertions.assertEquals( + StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void updateBucketAsyncTest() throws Exception { + void updateBucketAsyncTest() throws Exception { LogBucket expectedResponse = LogBucket.newBuilder() .setName( @@ -539,23 +540,23 @@ public void updateBucketAsyncTest() throws Exception { .build(); LogBucket actualResponse = client.updateBucketAsyncAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateBucketRequest actualRequest = ((UpdateBucketRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getBucket(), actualRequest.getBucket()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertEquals(request.getBucket(), actualRequest.getBucket()); + Assertions.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateBucketAsyncExceptionTest() throws Exception { + void updateBucketAsyncExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -569,16 +570,17 @@ public void updateBucketAsyncExceptionTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .build(); client.updateBucketAsyncAsync(request).get(); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assertions.assertEquals( + StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void createBucketTest() throws Exception { + void createBucketTest() throws Exception { LogBucket expectedResponse = LogBucket.newBuilder() .setName( @@ -605,23 +607,23 @@ public void createBucketTest() throws Exception { .build(); LogBucket actualResponse = client.createBucket(request); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateBucketRequest actualRequest = ((CreateBucketRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getBucketId(), actualRequest.getBucketId()); - Assert.assertEquals(request.getBucket(), actualRequest.getBucket()); - Assert.assertTrue( + Assertions.assertEquals(request.getParent(), actualRequest.getParent()); + Assertions.assertEquals(request.getBucketId(), actualRequest.getBucketId()); + Assertions.assertEquals(request.getBucket(), actualRequest.getBucket()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createBucketExceptionTest() throws Exception { + void createBucketExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -633,14 +635,14 @@ public void createBucketExceptionTest() throws Exception { .setBucket(LogBucket.newBuilder().build()) .build(); client.createBucket(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateBucketTest() throws Exception { + void updateBucketTest() throws Exception { LogBucket expectedResponse = LogBucket.newBuilder() .setName( @@ -669,23 +671,23 @@ public void updateBucketTest() throws Exception { .build(); LogBucket actualResponse = client.updateBucket(request); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateBucketRequest actualRequest = ((UpdateBucketRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getBucket(), actualRequest.getBucket()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertEquals(request.getBucket(), actualRequest.getBucket()); + Assertions.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateBucketExceptionTest() throws Exception { + void updateBucketExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -699,14 +701,14 @@ public void updateBucketExceptionTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .build(); client.updateBucket(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void deleteBucketTest() throws Exception { + void deleteBucketTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -720,18 +722,18 @@ public void deleteBucketTest() throws Exception { client.deleteBucket(request); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteBucketRequest actualRequest = ((DeleteBucketRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteBucketExceptionTest() throws Exception { + void deleteBucketExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -743,14 +745,14 @@ public void deleteBucketExceptionTest() throws Exception { .toString()) .build(); client.deleteBucket(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void undeleteBucketTest() throws Exception { + void undeleteBucketTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -764,18 +766,18 @@ public void undeleteBucketTest() throws Exception { client.undeleteBucket(request); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UndeleteBucketRequest actualRequest = ((UndeleteBucketRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void undeleteBucketExceptionTest() throws Exception { + void undeleteBucketExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -787,14 +789,14 @@ public void undeleteBucketExceptionTest() throws Exception { .toString()) .build(); client.undeleteBucket(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listViewsTest() throws Exception { + void listViewsTest() throws Exception { LogView responsesElement = LogView.newBuilder().build(); ListViewsResponse expectedResponse = ListViewsResponse.newBuilder() @@ -809,36 +811,36 @@ public void listViewsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getViewsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getViewsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListViewsRequest actualRequest = ((ListViewsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listViewsExceptionTest() throws Exception { + void listViewsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listViews(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getViewTest() throws Exception { + void getViewTest() throws Exception { LogView expectedResponse = LogView.newBuilder() .setName( @@ -861,21 +863,21 @@ public void getViewTest() throws Exception { .build(); LogView actualResponse = client.getView(request); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetViewRequest actualRequest = ((GetViewRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getViewExceptionTest() throws Exception { + void getViewExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -888,14 +890,14 @@ public void getViewExceptionTest() throws Exception { .toString()) .build(); client.getView(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createViewTest() throws Exception { + void createViewTest() throws Exception { LogView expectedResponse = LogView.newBuilder() .setName( @@ -917,23 +919,23 @@ public void createViewTest() throws Exception { .build(); LogView actualResponse = client.createView(request); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateViewRequest actualRequest = ((CreateViewRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getViewId(), actualRequest.getViewId()); - Assert.assertEquals(request.getView(), actualRequest.getView()); - Assert.assertTrue( + Assertions.assertEquals(request.getParent(), actualRequest.getParent()); + Assertions.assertEquals(request.getViewId(), actualRequest.getViewId()); + Assertions.assertEquals(request.getView(), actualRequest.getView()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createViewExceptionTest() throws Exception { + void createViewExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -945,14 +947,14 @@ public void createViewExceptionTest() throws Exception { .setView(LogView.newBuilder().build()) .build(); client.createView(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateViewTest() throws Exception { + void updateViewTest() throws Exception { LogView expectedResponse = LogView.newBuilder() .setName( @@ -974,23 +976,23 @@ public void updateViewTest() throws Exception { .build(); LogView actualResponse = client.updateView(request); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateViewRequest actualRequest = ((UpdateViewRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getView(), actualRequest.getView()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertEquals(request.getView(), actualRequest.getView()); + Assertions.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateViewExceptionTest() throws Exception { + void updateViewExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1002,14 +1004,14 @@ public void updateViewExceptionTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .build(); client.updateView(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void deleteViewTest() throws Exception { + void deleteViewTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -1024,18 +1026,18 @@ public void deleteViewTest() throws Exception { client.deleteView(request); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteViewRequest actualRequest = ((DeleteViewRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteViewExceptionTest() throws Exception { + void deleteViewExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1048,14 +1050,14 @@ public void deleteViewExceptionTest() throws Exception { .toString()) .build(); client.deleteView(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listSinksTest() throws Exception { + void listSinksTest() throws Exception { LogSink responsesElement = LogSink.newBuilder().build(); ListSinksResponse expectedResponse = ListSinksResponse.newBuilder() @@ -1070,36 +1072,36 @@ public void listSinksTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListSinksRequest actualRequest = ((ListSinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listSinksExceptionTest() throws Exception { + void listSinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]"); client.listSinks(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listSinksTest2() throws Exception { + void listSinksTest2() throws Exception { LogSink responsesElement = LogSink.newBuilder().build(); ListSinksResponse expectedResponse = ListSinksResponse.newBuilder() @@ -1114,36 +1116,36 @@ public void listSinksTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListSinksRequest actualRequest = ((ListSinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listSinksExceptionTest2() throws Exception { + void listSinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { FolderName parent = FolderName.of("[FOLDER]"); client.listSinks(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listSinksTest3() throws Exception { + void listSinksTest3() throws Exception { LogSink responsesElement = LogSink.newBuilder().build(); ListSinksResponse expectedResponse = ListSinksResponse.newBuilder() @@ -1158,36 +1160,36 @@ public void listSinksTest3() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListSinksRequest actualRequest = ((ListSinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listSinksExceptionTest3() throws Exception { + void listSinksExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); client.listSinks(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listSinksTest4() throws Exception { + void listSinksTest4() throws Exception { LogSink responsesElement = LogSink.newBuilder().build(); ListSinksResponse expectedResponse = ListSinksResponse.newBuilder() @@ -1202,36 +1204,36 @@ public void listSinksTest4() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListSinksRequest actualRequest = ((ListSinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listSinksExceptionTest4() throws Exception { + void listSinksExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { ProjectName parent = ProjectName.of("[PROJECT]"); client.listSinks(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listSinksTest5() throws Exception { + void listSinksTest5() throws Exception { LogSink responsesElement = LogSink.newBuilder().build(); ListSinksResponse expectedResponse = ListSinksResponse.newBuilder() @@ -1246,36 +1248,36 @@ public void listSinksTest5() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListSinksRequest actualRequest = ((ListSinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listSinksExceptionTest5() throws Exception { + void listSinksExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listSinks(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getSinkTest() throws Exception { + void getSinkTest() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1294,35 +1296,35 @@ public void getSinkTest() throws Exception { LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]"); LogSink actualResponse = client.getSink(sinkName); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetSinkRequest actualRequest = ((GetSinkRequest) actualRequests.get(0)); - Assert.assertEquals(sinkName.toString(), actualRequest.getSinkName()); - Assert.assertTrue( + Assertions.assertEquals(sinkName.toString(), actualRequest.getSinkName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getSinkExceptionTest() throws Exception { + void getSinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]"); client.getSink(sinkName); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getSinkTest2() throws Exception { + void getSinkTest2() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1341,35 +1343,35 @@ public void getSinkTest2() throws Exception { String sinkName = "sinkName508775358"; LogSink actualResponse = client.getSink(sinkName); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetSinkRequest actualRequest = ((GetSinkRequest) actualRequests.get(0)); - Assert.assertEquals(sinkName, actualRequest.getSinkName()); - Assert.assertTrue( + Assertions.assertEquals(sinkName, actualRequest.getSinkName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getSinkExceptionTest2() throws Exception { + void getSinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String sinkName = "sinkName508775358"; client.getSink(sinkName); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createSinkTest() throws Exception { + void createSinkTest() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1389,22 +1391,22 @@ public void createSinkTest() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.createSink(parent, sink); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateSinkRequest actualRequest = ((CreateSinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(sink, actualRequest.getSink()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertEquals(sink, actualRequest.getSink()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createSinkExceptionTest() throws Exception { + void createSinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1412,14 +1414,14 @@ public void createSinkExceptionTest() throws Exception { BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]"); LogSink sink = LogSink.newBuilder().build(); client.createSink(parent, sink); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createSinkTest2() throws Exception { + void createSinkTest2() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1439,22 +1441,22 @@ public void createSinkTest2() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.createSink(parent, sink); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateSinkRequest actualRequest = ((CreateSinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(sink, actualRequest.getSink()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertEquals(sink, actualRequest.getSink()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createSinkExceptionTest2() throws Exception { + void createSinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1462,14 +1464,14 @@ public void createSinkExceptionTest2() throws Exception { FolderName parent = FolderName.of("[FOLDER]"); LogSink sink = LogSink.newBuilder().build(); client.createSink(parent, sink); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createSinkTest3() throws Exception { + void createSinkTest3() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1489,22 +1491,22 @@ public void createSinkTest3() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.createSink(parent, sink); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateSinkRequest actualRequest = ((CreateSinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(sink, actualRequest.getSink()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertEquals(sink, actualRequest.getSink()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createSinkExceptionTest3() throws Exception { + void createSinkExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1512,14 +1514,14 @@ public void createSinkExceptionTest3() throws Exception { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); LogSink sink = LogSink.newBuilder().build(); client.createSink(parent, sink); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createSinkTest4() throws Exception { + void createSinkTest4() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1539,22 +1541,22 @@ public void createSinkTest4() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.createSink(parent, sink); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateSinkRequest actualRequest = ((CreateSinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(sink, actualRequest.getSink()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertEquals(sink, actualRequest.getSink()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createSinkExceptionTest4() throws Exception { + void createSinkExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1562,14 +1564,14 @@ public void createSinkExceptionTest4() throws Exception { ProjectName parent = ProjectName.of("[PROJECT]"); LogSink sink = LogSink.newBuilder().build(); client.createSink(parent, sink); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createSinkTest5() throws Exception { + void createSinkTest5() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1589,22 +1591,22 @@ public void createSinkTest5() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.createSink(parent, sink); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateSinkRequest actualRequest = ((CreateSinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(sink, actualRequest.getSink()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertEquals(sink, actualRequest.getSink()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createSinkExceptionTest5() throws Exception { + void createSinkExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1612,14 +1614,14 @@ public void createSinkExceptionTest5() throws Exception { String parent = "parent-995424086"; LogSink sink = LogSink.newBuilder().build(); client.createSink(parent, sink); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateSinkTest() throws Exception { + void updateSinkTest() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1639,22 +1641,22 @@ public void updateSinkTest() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.updateSink(sinkName, sink); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateSinkRequest actualRequest = ((UpdateSinkRequest) actualRequests.get(0)); - Assert.assertEquals(sinkName.toString(), actualRequest.getSinkName()); - Assert.assertEquals(sink, actualRequest.getSink()); - Assert.assertTrue( + Assertions.assertEquals(sinkName.toString(), actualRequest.getSinkName()); + Assertions.assertEquals(sink, actualRequest.getSink()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateSinkExceptionTest() throws Exception { + void updateSinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1662,14 +1664,14 @@ public void updateSinkExceptionTest() throws Exception { LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]"); LogSink sink = LogSink.newBuilder().build(); client.updateSink(sinkName, sink); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateSinkTest2() throws Exception { + void updateSinkTest2() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1689,22 +1691,22 @@ public void updateSinkTest2() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.updateSink(sinkName, sink); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateSinkRequest actualRequest = ((UpdateSinkRequest) actualRequests.get(0)); - Assert.assertEquals(sinkName, actualRequest.getSinkName()); - Assert.assertEquals(sink, actualRequest.getSink()); - Assert.assertTrue( + Assertions.assertEquals(sinkName, actualRequest.getSinkName()); + Assertions.assertEquals(sink, actualRequest.getSink()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateSinkExceptionTest2() throws Exception { + void updateSinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1712,14 +1714,14 @@ public void updateSinkExceptionTest2() throws Exception { String sinkName = "sinkName508775358"; LogSink sink = LogSink.newBuilder().build(); client.updateSink(sinkName, sink); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateSinkTest3() throws Exception { + void updateSinkTest3() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1740,23 +1742,23 @@ public void updateSinkTest3() throws Exception { FieldMask updateMask = FieldMask.newBuilder().build(); LogSink actualResponse = client.updateSink(sinkName, sink, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateSinkRequest actualRequest = ((UpdateSinkRequest) actualRequests.get(0)); - Assert.assertEquals(sinkName.toString(), actualRequest.getSinkName()); - Assert.assertEquals(sink, actualRequest.getSink()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( + Assertions.assertEquals(sinkName.toString(), actualRequest.getSinkName()); + Assertions.assertEquals(sink, actualRequest.getSink()); + Assertions.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateSinkExceptionTest3() throws Exception { + void updateSinkExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1765,14 +1767,14 @@ public void updateSinkExceptionTest3() throws Exception { LogSink sink = LogSink.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSink(sinkName, sink, updateMask); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateSinkTest4() throws Exception { + void updateSinkTest4() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1793,23 +1795,23 @@ public void updateSinkTest4() throws Exception { FieldMask updateMask = FieldMask.newBuilder().build(); LogSink actualResponse = client.updateSink(sinkName, sink, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateSinkRequest actualRequest = ((UpdateSinkRequest) actualRequests.get(0)); - Assert.assertEquals(sinkName, actualRequest.getSinkName()); - Assert.assertEquals(sink, actualRequest.getSink()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( + Assertions.assertEquals(sinkName, actualRequest.getSinkName()); + Assertions.assertEquals(sink, actualRequest.getSink()); + Assertions.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateSinkExceptionTest4() throws Exception { + void updateSinkExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1818,14 +1820,14 @@ public void updateSinkExceptionTest4() throws Exception { LogSink sink = LogSink.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSink(sinkName, sink, updateMask); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void deleteSinkTest() throws Exception { + void deleteSinkTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -1834,32 +1836,32 @@ public void deleteSinkTest() throws Exception { client.deleteSink(sinkName); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteSinkRequest actualRequest = ((DeleteSinkRequest) actualRequests.get(0)); - Assert.assertEquals(sinkName.toString(), actualRequest.getSinkName()); - Assert.assertTrue( + Assertions.assertEquals(sinkName.toString(), actualRequest.getSinkName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteSinkExceptionTest() throws Exception { + void deleteSinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]"); client.deleteSink(sinkName); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void deleteSinkTest2() throws Exception { + void deleteSinkTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -1868,32 +1870,32 @@ public void deleteSinkTest2() throws Exception { client.deleteSink(sinkName); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteSinkRequest actualRequest = ((DeleteSinkRequest) actualRequests.get(0)); - Assert.assertEquals(sinkName, actualRequest.getSinkName()); - Assert.assertTrue( + Assertions.assertEquals(sinkName, actualRequest.getSinkName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteSinkExceptionTest2() throws Exception { + void deleteSinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String sinkName = "sinkName508775358"; client.deleteSink(sinkName); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createLinkTest() throws Exception { + void createLinkTest() throws Exception { Link expectedResponse = Link.newBuilder() .setName( @@ -1919,23 +1921,23 @@ public void createLinkTest() throws Exception { String linkId = "linkId-1102667083"; Link actualResponse = client.createLinkAsync(parent, link, linkId).get(); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateLinkRequest actualRequest = ((CreateLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(link, actualRequest.getLink()); - Assert.assertEquals(linkId, actualRequest.getLinkId()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertEquals(link, actualRequest.getLink()); + Assertions.assertEquals(linkId, actualRequest.getLinkId()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createLinkExceptionTest() throws Exception { + void createLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1945,16 +1947,17 @@ public void createLinkExceptionTest() throws Exception { Link link = Link.newBuilder().build(); String linkId = "linkId-1102667083"; client.createLinkAsync(parent, link, linkId).get(); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assertions.assertEquals( + StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void createLinkTest2() throws Exception { + void createLinkTest2() throws Exception { Link expectedResponse = Link.newBuilder() .setName( @@ -1979,23 +1982,23 @@ public void createLinkTest2() throws Exception { String linkId = "linkId-1102667083"; Link actualResponse = client.createLinkAsync(parent, link, linkId).get(); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateLinkRequest actualRequest = ((CreateLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(link, actualRequest.getLink()); - Assert.assertEquals(linkId, actualRequest.getLinkId()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertEquals(link, actualRequest.getLink()); + Assertions.assertEquals(linkId, actualRequest.getLinkId()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createLinkExceptionTest2() throws Exception { + void createLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2004,16 +2007,17 @@ public void createLinkExceptionTest2() throws Exception { Link link = Link.newBuilder().build(); String linkId = "linkId-1102667083"; client.createLinkAsync(parent, link, linkId).get(); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assertions.assertEquals( + StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void deleteLinkTest() throws Exception { + void deleteLinkTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = Operation.newBuilder() @@ -2029,18 +2033,18 @@ public void deleteLinkTest() throws Exception { client.deleteLinkAsync(name).get(); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteLinkRequest actualRequest = ((DeleteLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(name.toString(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteLinkExceptionTest() throws Exception { + void deleteLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2048,16 +2052,17 @@ public void deleteLinkExceptionTest() throws Exception { LinkName name = LinkName.ofProjectLocationBucketLinkName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[LINK]"); client.deleteLinkAsync(name).get(); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assertions.assertEquals( + StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void deleteLinkTest2() throws Exception { + void deleteLinkTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = Operation.newBuilder() @@ -2072,34 +2077,35 @@ public void deleteLinkTest2() throws Exception { client.deleteLinkAsync(name).get(); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteLinkRequest actualRequest = ((DeleteLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(name, actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteLinkExceptionTest2() throws Exception { + void deleteLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String name = "name3373707"; client.deleteLinkAsync(name).get(); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assertions.assertEquals( + StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void listLinksTest() throws Exception { + void listLinksTest() throws Exception { Link responsesElement = Link.newBuilder().build(); ListLinksResponse expectedResponse = ListLinksResponse.newBuilder() @@ -2115,22 +2121,22 @@ public void listLinksTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListLinksRequest actualRequest = ((ListLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listLinksExceptionTest() throws Exception { + void listLinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2138,14 +2144,14 @@ public void listLinksExceptionTest() throws Exception { LogBucketName parent = LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]"); client.listLinks(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listLinksTest2() throws Exception { + void listLinksTest2() throws Exception { Link responsesElement = Link.newBuilder().build(); ListLinksResponse expectedResponse = ListLinksResponse.newBuilder() @@ -2160,36 +2166,36 @@ public void listLinksTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListLinksRequest actualRequest = ((ListLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listLinksExceptionTest2() throws Exception { + void listLinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listLinks(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getLinkTest() throws Exception { + void getLinkTest() throws Exception { Link expectedResponse = Link.newBuilder() .setName( @@ -2207,21 +2213,21 @@ public void getLinkTest() throws Exception { LinkName.ofProjectLocationBucketLinkName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[LINK]"); Link actualResponse = client.getLink(name); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetLinkRequest actualRequest = ((GetLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(name.toString(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getLinkExceptionTest() throws Exception { + void getLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2229,14 +2235,14 @@ public void getLinkExceptionTest() throws Exception { LinkName name = LinkName.ofProjectLocationBucketLinkName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[LINK]"); client.getLink(name); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getLinkTest2() throws Exception { + void getLinkTest2() throws Exception { Link expectedResponse = Link.newBuilder() .setName( @@ -2253,35 +2259,35 @@ public void getLinkTest2() throws Exception { String name = "name3373707"; Link actualResponse = client.getLink(name); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetLinkRequest actualRequest = ((GetLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(name, actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getLinkExceptionTest2() throws Exception { + void getLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String name = "name3373707"; client.getLink(name); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listExclusionsTest() throws Exception { + void listExclusionsTest() throws Exception { LogExclusion responsesElement = LogExclusion.newBuilder().build(); ListExclusionsResponse expectedResponse = ListExclusionsResponse.newBuilder() @@ -2296,36 +2302,36 @@ public void listExclusionsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListExclusionsRequest actualRequest = ((ListExclusionsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listExclusionsExceptionTest() throws Exception { + void listExclusionsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]"); client.listExclusions(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listExclusionsTest2() throws Exception { + void listExclusionsTest2() throws Exception { LogExclusion responsesElement = LogExclusion.newBuilder().build(); ListExclusionsResponse expectedResponse = ListExclusionsResponse.newBuilder() @@ -2340,36 +2346,36 @@ public void listExclusionsTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListExclusionsRequest actualRequest = ((ListExclusionsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listExclusionsExceptionTest2() throws Exception { + void listExclusionsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { FolderName parent = FolderName.of("[FOLDER]"); client.listExclusions(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listExclusionsTest3() throws Exception { + void listExclusionsTest3() throws Exception { LogExclusion responsesElement = LogExclusion.newBuilder().build(); ListExclusionsResponse expectedResponse = ListExclusionsResponse.newBuilder() @@ -2384,36 +2390,36 @@ public void listExclusionsTest3() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListExclusionsRequest actualRequest = ((ListExclusionsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listExclusionsExceptionTest3() throws Exception { + void listExclusionsExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); client.listExclusions(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listExclusionsTest4() throws Exception { + void listExclusionsTest4() throws Exception { LogExclusion responsesElement = LogExclusion.newBuilder().build(); ListExclusionsResponse expectedResponse = ListExclusionsResponse.newBuilder() @@ -2428,36 +2434,36 @@ public void listExclusionsTest4() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListExclusionsRequest actualRequest = ((ListExclusionsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listExclusionsExceptionTest4() throws Exception { + void listExclusionsExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { ProjectName parent = ProjectName.of("[PROJECT]"); client.listExclusions(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listExclusionsTest5() throws Exception { + void listExclusionsTest5() throws Exception { LogExclusion responsesElement = LogExclusion.newBuilder().build(); ListExclusionsResponse expectedResponse = ListExclusionsResponse.newBuilder() @@ -2472,36 +2478,36 @@ public void listExclusionsTest5() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListExclusionsRequest actualRequest = ((ListExclusionsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listExclusionsExceptionTest5() throws Exception { + void listExclusionsExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listExclusions(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getExclusionTest() throws Exception { + void getExclusionTest() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2516,35 +2522,35 @@ public void getExclusionTest() throws Exception { LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]"); LogExclusion actualResponse = client.getExclusion(name); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetExclusionRequest actualRequest = ((GetExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(name.toString(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getExclusionExceptionTest() throws Exception { + void getExclusionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]"); client.getExclusion(name); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getExclusionTest2() throws Exception { + void getExclusionTest2() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2559,35 +2565,35 @@ public void getExclusionTest2() throws Exception { String name = "name3373707"; LogExclusion actualResponse = client.getExclusion(name); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetExclusionRequest actualRequest = ((GetExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(name, actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getExclusionExceptionTest2() throws Exception { + void getExclusionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String name = "name3373707"; client.getExclusion(name); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createExclusionTest() throws Exception { + void createExclusionTest() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2603,22 +2609,22 @@ public void createExclusionTest() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); LogExclusion actualResponse = client.createExclusion(parent, exclusion); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateExclusionRequest actualRequest = ((CreateExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(exclusion, actualRequest.getExclusion()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertEquals(exclusion, actualRequest.getExclusion()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createExclusionExceptionTest() throws Exception { + void createExclusionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2626,14 +2632,14 @@ public void createExclusionExceptionTest() throws Exception { BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]"); LogExclusion exclusion = LogExclusion.newBuilder().build(); client.createExclusion(parent, exclusion); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createExclusionTest2() throws Exception { + void createExclusionTest2() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2649,22 +2655,22 @@ public void createExclusionTest2() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); LogExclusion actualResponse = client.createExclusion(parent, exclusion); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateExclusionRequest actualRequest = ((CreateExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(exclusion, actualRequest.getExclusion()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertEquals(exclusion, actualRequest.getExclusion()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createExclusionExceptionTest2() throws Exception { + void createExclusionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2672,14 +2678,14 @@ public void createExclusionExceptionTest2() throws Exception { FolderName parent = FolderName.of("[FOLDER]"); LogExclusion exclusion = LogExclusion.newBuilder().build(); client.createExclusion(parent, exclusion); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createExclusionTest3() throws Exception { + void createExclusionTest3() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2695,22 +2701,22 @@ public void createExclusionTest3() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); LogExclusion actualResponse = client.createExclusion(parent, exclusion); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateExclusionRequest actualRequest = ((CreateExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(exclusion, actualRequest.getExclusion()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertEquals(exclusion, actualRequest.getExclusion()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createExclusionExceptionTest3() throws Exception { + void createExclusionExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2718,14 +2724,14 @@ public void createExclusionExceptionTest3() throws Exception { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); LogExclusion exclusion = LogExclusion.newBuilder().build(); client.createExclusion(parent, exclusion); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createExclusionTest4() throws Exception { + void createExclusionTest4() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2741,22 +2747,22 @@ public void createExclusionTest4() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); LogExclusion actualResponse = client.createExclusion(parent, exclusion); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateExclusionRequest actualRequest = ((CreateExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(exclusion, actualRequest.getExclusion()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertEquals(exclusion, actualRequest.getExclusion()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createExclusionExceptionTest4() throws Exception { + void createExclusionExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2764,14 +2770,14 @@ public void createExclusionExceptionTest4() throws Exception { ProjectName parent = ProjectName.of("[PROJECT]"); LogExclusion exclusion = LogExclusion.newBuilder().build(); client.createExclusion(parent, exclusion); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createExclusionTest5() throws Exception { + void createExclusionTest5() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2787,22 +2793,22 @@ public void createExclusionTest5() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); LogExclusion actualResponse = client.createExclusion(parent, exclusion); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateExclusionRequest actualRequest = ((CreateExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(exclusion, actualRequest.getExclusion()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertEquals(exclusion, actualRequest.getExclusion()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createExclusionExceptionTest5() throws Exception { + void createExclusionExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2810,14 +2816,14 @@ public void createExclusionExceptionTest5() throws Exception { String parent = "parent-995424086"; LogExclusion exclusion = LogExclusion.newBuilder().build(); client.createExclusion(parent, exclusion); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateExclusionTest() throws Exception { + void updateExclusionTest() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2834,23 +2840,23 @@ public void updateExclusionTest() throws Exception { FieldMask updateMask = FieldMask.newBuilder().build(); LogExclusion actualResponse = client.updateExclusion(name, exclusion, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateExclusionRequest actualRequest = ((UpdateExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(exclusion, actualRequest.getExclusion()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( + Assertions.assertEquals(name.toString(), actualRequest.getName()); + Assertions.assertEquals(exclusion, actualRequest.getExclusion()); + Assertions.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateExclusionExceptionTest() throws Exception { + void updateExclusionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2859,14 +2865,14 @@ public void updateExclusionExceptionTest() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateExclusion(name, exclusion, updateMask); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateExclusionTest2() throws Exception { + void updateExclusionTest2() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2883,23 +2889,23 @@ public void updateExclusionTest2() throws Exception { FieldMask updateMask = FieldMask.newBuilder().build(); LogExclusion actualResponse = client.updateExclusion(name, exclusion, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateExclusionRequest actualRequest = ((UpdateExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(exclusion, actualRequest.getExclusion()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( + Assertions.assertEquals(name, actualRequest.getName()); + Assertions.assertEquals(exclusion, actualRequest.getExclusion()); + Assertions.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateExclusionExceptionTest2() throws Exception { + void updateExclusionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2908,14 +2914,14 @@ public void updateExclusionExceptionTest2() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateExclusion(name, exclusion, updateMask); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void deleteExclusionTest() throws Exception { + void deleteExclusionTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -2924,32 +2930,32 @@ public void deleteExclusionTest() throws Exception { client.deleteExclusion(name); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteExclusionRequest actualRequest = ((DeleteExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(name.toString(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteExclusionExceptionTest() throws Exception { + void deleteExclusionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]"); client.deleteExclusion(name); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void deleteExclusionTest2() throws Exception { + void deleteExclusionTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -2958,32 +2964,32 @@ public void deleteExclusionTest2() throws Exception { client.deleteExclusion(name); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteExclusionRequest actualRequest = ((DeleteExclusionRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(name, actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteExclusionExceptionTest2() throws Exception { + void deleteExclusionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String name = "name3373707"; client.deleteExclusion(name); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getCmekSettingsTest() throws Exception { + void getCmekSettingsTest() throws Exception { CmekSettings expectedResponse = CmekSettings.newBuilder() .setName(CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]").toString()) @@ -2999,21 +3005,21 @@ public void getCmekSettingsTest() throws Exception { .build(); CmekSettings actualResponse = client.getCmekSettings(request); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetCmekSettingsRequest actualRequest = ((GetCmekSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getCmekSettingsExceptionTest() throws Exception { + void getCmekSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -3023,14 +3029,14 @@ public void getCmekSettingsExceptionTest() throws Exception { .setName(CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]").toString()) .build(); client.getCmekSettings(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateCmekSettingsTest() throws Exception { + void updateCmekSettingsTest() throws Exception { CmekSettings expectedResponse = CmekSettings.newBuilder() .setName(CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]").toString()) @@ -3048,23 +3054,23 @@ public void updateCmekSettingsTest() throws Exception { .build(); CmekSettings actualResponse = client.updateCmekSettings(request); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateCmekSettingsRequest actualRequest = ((UpdateCmekSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getCmekSettings(), actualRequest.getCmekSettings()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertEquals(request.getCmekSettings(), actualRequest.getCmekSettings()); + Assertions.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateCmekSettingsExceptionTest() throws Exception { + void updateCmekSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -3076,14 +3082,14 @@ public void updateCmekSettingsExceptionTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .build(); client.updateCmekSettings(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getSettingsTest() throws Exception { + void getSettingsTest() throws Exception { Settings expectedResponse = Settings.newBuilder() .setName(SettingsName.ofProjectName("[PROJECT]").toString()) @@ -3097,35 +3103,35 @@ public void getSettingsTest() throws Exception { SettingsName name = SettingsName.ofProjectName("[PROJECT]"); Settings actualResponse = client.getSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetSettingsRequest actualRequest = ((GetSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(name.toString(), actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getSettingsExceptionTest() throws Exception { + void getSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { SettingsName name = SettingsName.ofProjectName("[PROJECT]"); client.getSettings(name); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getSettingsTest2() throws Exception { + void getSettingsTest2() throws Exception { Settings expectedResponse = Settings.newBuilder() .setName(SettingsName.ofProjectName("[PROJECT]").toString()) @@ -3139,35 +3145,35 @@ public void getSettingsTest2() throws Exception { String name = "name3373707"; Settings actualResponse = client.getSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetSettingsRequest actualRequest = ((GetSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( + Assertions.assertEquals(name, actualRequest.getName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getSettingsExceptionTest2() throws Exception { + void getSettingsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String name = "name3373707"; client.getSettings(name); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateSettingsTest() throws Exception { + void updateSettingsTest() throws Exception { Settings expectedResponse = Settings.newBuilder() .setName(SettingsName.ofProjectName("[PROJECT]").toString()) @@ -3182,22 +3188,22 @@ public void updateSettingsTest() throws Exception { FieldMask updateMask = FieldMask.newBuilder().build(); Settings actualResponse = client.updateSettings(settings, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateSettingsRequest actualRequest = ((UpdateSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(settings, actualRequest.getSettings()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( + Assertions.assertEquals(settings, actualRequest.getSettings()); + Assertions.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateSettingsExceptionTest() throws Exception { + void updateSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -3205,14 +3211,14 @@ public void updateSettingsExceptionTest() throws Exception { Settings settings = Settings.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSettings(settings, updateMask); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void copyLogEntriesTest() throws Exception { + void copyLogEntriesTest() throws Exception { CopyLogEntriesResponse expectedResponse = CopyLogEntriesResponse.newBuilder().setLogEntriesCopiedCount(-2134326978).build(); Operation resultOperation = @@ -3231,23 +3237,23 @@ public void copyLogEntriesTest() throws Exception { .build(); CopyLogEntriesResponse actualResponse = client.copyLogEntriesAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CopyLogEntriesRequest actualRequest = ((CopyLogEntriesRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); - Assert.assertEquals(request.getDestination(), actualRequest.getDestination()); - Assert.assertTrue( + Assertions.assertEquals(request.getName(), actualRequest.getName()); + Assertions.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assertions.assertEquals(request.getDestination(), actualRequest.getDestination()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void copyLogEntriesExceptionTest() throws Exception { + void copyLogEntriesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -3259,11 +3265,12 @@ public void copyLogEntriesExceptionTest() throws Exception { .setDestination("destination-1429847026") .build(); client.copyLogEntriesAsync(request).get(); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assertions.assertEquals( + StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } } diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java index 5299f9673..f34a2103f 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java @@ -64,21 +64,21 @@ import java.util.UUID; import java.util.concurrent.ExecutionException; import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; @Generated("by gapic-generator-java") -public class LoggingClientTest { +class LoggingClientTest { private static MockLoggingServiceV2 mockLoggingServiceV2; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private LoggingClient client; - @BeforeClass + @BeforeAll public static void startStaticServer() { mockLoggingServiceV2 = new MockLoggingServiceV2(); mockServiceHelper = @@ -87,13 +87,13 @@ public static void startStaticServer() { mockServiceHelper.start(); } - @AfterClass + @AfterAll public static void stopServer() { mockServiceHelper.stop(); } - @Before - public void setUp() throws IOException { + @BeforeEach + void setUp() throws IOException { mockServiceHelper.reset(); channelProvider = mockServiceHelper.createChannelProvider(); LoggingSettings settings = @@ -104,13 +104,13 @@ public void setUp() throws IOException { client = LoggingClient.create(settings); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { client.close(); } @Test - public void deleteLogTest() throws Exception { + void deleteLogTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockLoggingServiceV2.addResponse(expectedResponse); @@ -119,32 +119,32 @@ public void deleteLogTest() throws Exception { client.deleteLog(logName); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteLogRequest actualRequest = ((DeleteLogRequest) actualRequests.get(0)); - Assert.assertEquals(logName.toString(), actualRequest.getLogName()); - Assert.assertTrue( + Assertions.assertEquals(logName.toString(), actualRequest.getLogName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteLogExceptionTest() throws Exception { + void deleteLogExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]"); client.deleteLog(logName); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void deleteLogTest2() throws Exception { + void deleteLogTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockLoggingServiceV2.addResponse(expectedResponse); @@ -153,32 +153,32 @@ public void deleteLogTest2() throws Exception { client.deleteLog(logName); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteLogRequest actualRequest = ((DeleteLogRequest) actualRequests.get(0)); - Assert.assertEquals(logName, actualRequest.getLogName()); - Assert.assertTrue( + Assertions.assertEquals(logName, actualRequest.getLogName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteLogExceptionTest2() throws Exception { + void deleteLogExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { String logName = "logName341528559"; client.deleteLog(logName); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void writeLogEntriesTest() throws Exception { + void writeLogEntriesTest() throws Exception { WriteLogEntriesResponse expectedResponse = WriteLogEntriesResponse.newBuilder().build(); mockLoggingServiceV2.addResponse(expectedResponse); @@ -189,24 +189,24 @@ public void writeLogEntriesTest() throws Exception { WriteLogEntriesResponse actualResponse = client.writeLogEntries(logName, resource, labels, entries); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); WriteLogEntriesRequest actualRequest = ((WriteLogEntriesRequest) actualRequests.get(0)); - Assert.assertEquals(logName.toString(), actualRequest.getLogName()); - Assert.assertEquals(resource, actualRequest.getResource()); - Assert.assertEquals(labels, actualRequest.getLabelsMap()); - Assert.assertEquals(entries, actualRequest.getEntriesList()); - Assert.assertTrue( + Assertions.assertEquals(logName.toString(), actualRequest.getLogName()); + Assertions.assertEquals(resource, actualRequest.getResource()); + Assertions.assertEquals(labels, actualRequest.getLabelsMap()); + Assertions.assertEquals(entries, actualRequest.getEntriesList()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void writeLogEntriesExceptionTest() throws Exception { + void writeLogEntriesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); @@ -216,14 +216,14 @@ public void writeLogEntriesExceptionTest() throws Exception { Map labels = new HashMap<>(); List entries = new ArrayList<>(); client.writeLogEntries(logName, resource, labels, entries); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void writeLogEntriesTest2() throws Exception { + void writeLogEntriesTest2() throws Exception { WriteLogEntriesResponse expectedResponse = WriteLogEntriesResponse.newBuilder().build(); mockLoggingServiceV2.addResponse(expectedResponse); @@ -234,24 +234,24 @@ public void writeLogEntriesTest2() throws Exception { WriteLogEntriesResponse actualResponse = client.writeLogEntries(logName, resource, labels, entries); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); WriteLogEntriesRequest actualRequest = ((WriteLogEntriesRequest) actualRequests.get(0)); - Assert.assertEquals(logName, actualRequest.getLogName()); - Assert.assertEquals(resource, actualRequest.getResource()); - Assert.assertEquals(labels, actualRequest.getLabelsMap()); - Assert.assertEquals(entries, actualRequest.getEntriesList()); - Assert.assertTrue( + Assertions.assertEquals(logName, actualRequest.getLogName()); + Assertions.assertEquals(resource, actualRequest.getResource()); + Assertions.assertEquals(labels, actualRequest.getLabelsMap()); + Assertions.assertEquals(entries, actualRequest.getEntriesList()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void writeLogEntriesExceptionTest2() throws Exception { + void writeLogEntriesExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); @@ -261,14 +261,14 @@ public void writeLogEntriesExceptionTest2() throws Exception { Map labels = new HashMap<>(); List entries = new ArrayList<>(); client.writeLogEntries(logName, resource, labels, entries); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listLogEntriesTest() throws Exception { + void listLogEntriesTest() throws Exception { LogEntry responsesElement = LogEntry.newBuilder().build(); ListLogEntriesResponse expectedResponse = ListLogEntriesResponse.newBuilder() @@ -286,24 +286,24 @@ public void listLogEntriesTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEntriesList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getEntriesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListLogEntriesRequest actualRequest = ((ListLogEntriesRequest) actualRequests.get(0)); - Assert.assertEquals(resourceNames, actualRequest.getResourceNamesList()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertEquals(orderBy, actualRequest.getOrderBy()); - Assert.assertTrue( + Assertions.assertEquals(resourceNames, actualRequest.getResourceNamesList()); + Assertions.assertEquals(filter, actualRequest.getFilter()); + Assertions.assertEquals(orderBy, actualRequest.getOrderBy()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listLogEntriesExceptionTest() throws Exception { + void listLogEntriesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); @@ -312,14 +312,14 @@ public void listLogEntriesExceptionTest() throws Exception { String filter = "filter-1274492040"; String orderBy = "orderBy-1207110587"; client.listLogEntries(resourceNames, filter, orderBy); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listMonitoredResourceDescriptorsTest() throws Exception { + void listMonitoredResourceDescriptorsTest() throws Exception { MonitoredResourceDescriptor responsesElement = MonitoredResourceDescriptor.newBuilder().build(); ListMonitoredResourceDescriptorsResponse expectedResponse = ListMonitoredResourceDescriptorsResponse.newBuilder() @@ -340,24 +340,24 @@ public void listMonitoredResourceDescriptorsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResourceDescriptorsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getResourceDescriptorsList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListMonitoredResourceDescriptorsRequest actualRequest = ((ListMonitoredResourceDescriptorsRequest) actualRequests.get(0)); - Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); - Assert.assertTrue( + Assertions.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assertions.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listMonitoredResourceDescriptorsExceptionTest() throws Exception { + void listMonitoredResourceDescriptorsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); @@ -368,14 +368,14 @@ public void listMonitoredResourceDescriptorsExceptionTest() throws Exception { .setPageToken("pageToken873572522") .build(); client.listMonitoredResourceDescriptors(request); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listLogsTest() throws Exception { + void listLogsTest() throws Exception { String responsesElement = "responsesElement-318365110"; ListLogsResponse expectedResponse = ListLogsResponse.newBuilder() @@ -390,36 +390,36 @@ public void listLogsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListLogsRequest actualRequest = ((ListLogsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listLogsExceptionTest() throws Exception { + void listLogsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]"); client.listLogs(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listLogsTest2() throws Exception { + void listLogsTest2() throws Exception { String responsesElement = "responsesElement-318365110"; ListLogsResponse expectedResponse = ListLogsResponse.newBuilder() @@ -434,36 +434,36 @@ public void listLogsTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListLogsRequest actualRequest = ((ListLogsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listLogsExceptionTest2() throws Exception { + void listLogsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { FolderName parent = FolderName.of("[FOLDER]"); client.listLogs(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listLogsTest3() throws Exception { + void listLogsTest3() throws Exception { String responsesElement = "responsesElement-318365110"; ListLogsResponse expectedResponse = ListLogsResponse.newBuilder() @@ -478,36 +478,36 @@ public void listLogsTest3() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListLogsRequest actualRequest = ((ListLogsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listLogsExceptionTest3() throws Exception { + void listLogsExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); client.listLogs(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listLogsTest4() throws Exception { + void listLogsTest4() throws Exception { String responsesElement = "responsesElement-318365110"; ListLogsResponse expectedResponse = ListLogsResponse.newBuilder() @@ -522,36 +522,36 @@ public void listLogsTest4() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListLogsRequest actualRequest = ((ListLogsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listLogsExceptionTest4() throws Exception { + void listLogsExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { ProjectName parent = ProjectName.of("[PROJECT]"); client.listLogs(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listLogsTest5() throws Exception { + void listLogsTest5() throws Exception { String responsesElement = "responsesElement-318365110"; ListLogsResponse expectedResponse = ListLogsResponse.newBuilder() @@ -566,36 +566,36 @@ public void listLogsTest5() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListLogsRequest actualRequest = ((ListLogsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listLogsExceptionTest5() throws Exception { + void listLogsExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listLogs(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void tailLogEntriesTest() throws Exception { + void tailLogEntriesTest() throws Exception { TailLogEntriesResponse expectedResponse = TailLogEntriesResponse.newBuilder() .addAllEntries(new ArrayList()) @@ -620,12 +620,12 @@ public void tailLogEntriesTest() throws Exception { requestObserver.onCompleted(); List actualResponses = responseObserver.future().get(); - Assert.assertEquals(1, actualResponses.size()); - Assert.assertEquals(expectedResponse, actualResponses.get(0)); + Assertions.assertEquals(1, actualResponses.size()); + Assertions.assertEquals(expectedResponse, actualResponses.get(0)); } @Test - public void tailLogEntriesExceptionTest() throws Exception { + void tailLogEntriesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); TailLogEntriesRequest request = @@ -646,11 +646,12 @@ public void tailLogEntriesExceptionTest() throws Exception { try { List actualResponses = responseObserver.future().get(); - Assert.fail("No exception thrown"); + Assertions.fail("No exception thrown"); } catch (ExecutionException e) { - Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + Assertions.assertTrue(e.getCause() instanceof InvalidArgumentException); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assertions.assertEquals( + StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } } diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java index a73df6937..5ff85d39a 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java @@ -47,21 +47,21 @@ import java.util.List; import java.util.UUID; import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; @Generated("by gapic-generator-java") -public class MetricsClientTest { +class MetricsClientTest { private static MockMetricsServiceV2 mockMetricsServiceV2; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private MetricsClient client; - @BeforeClass + @BeforeAll public static void startStaticServer() { mockMetricsServiceV2 = new MockMetricsServiceV2(); mockServiceHelper = @@ -70,13 +70,13 @@ public static void startStaticServer() { mockServiceHelper.start(); } - @AfterClass + @AfterAll public static void stopServer() { mockServiceHelper.stop(); } - @Before - public void setUp() throws IOException { + @BeforeEach + void setUp() throws IOException { mockServiceHelper.reset(); channelProvider = mockServiceHelper.createChannelProvider(); MetricsSettings settings = @@ -87,13 +87,13 @@ public void setUp() throws IOException { client = MetricsClient.create(settings); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { client.close(); } @Test - public void listLogMetricsTest() throws Exception { + void listLogMetricsTest() throws Exception { LogMetric responsesElement = LogMetric.newBuilder().build(); ListLogMetricsResponse expectedResponse = ListLogMetricsResponse.newBuilder() @@ -108,36 +108,36 @@ public void listLogMetricsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetricsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getMetricsList().get(0), resources.get(0)); List actualRequests = mockMetricsServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListLogMetricsRequest actualRequest = ((ListLogMetricsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listLogMetricsExceptionTest() throws Exception { + void listLogMetricsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { ProjectName parent = ProjectName.of("[PROJECT]"); client.listLogMetrics(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void listLogMetricsTest2() throws Exception { + void listLogMetricsTest2() throws Exception { LogMetric responsesElement = LogMetric.newBuilder().build(); ListLogMetricsResponse expectedResponse = ListLogMetricsResponse.newBuilder() @@ -152,36 +152,36 @@ public void listLogMetricsTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetricsList().get(0), resources.get(0)); + Assertions.assertEquals(1, resources.size()); + Assertions.assertEquals(expectedResponse.getMetricsList().get(0), resources.get(0)); List actualRequests = mockMetricsServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); ListLogMetricsRequest actualRequest = ((ListLogMetricsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void listLogMetricsExceptionTest2() throws Exception { + void listLogMetricsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listLogMetrics(parent); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getLogMetricTest() throws Exception { + void getLogMetricTest() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -201,35 +201,35 @@ public void getLogMetricTest() throws Exception { LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]"); LogMetric actualResponse = client.getLogMetric(metricName); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetLogMetricRequest actualRequest = ((GetLogMetricRequest) actualRequests.get(0)); - Assert.assertEquals(metricName.toString(), actualRequest.getMetricName()); - Assert.assertTrue( + Assertions.assertEquals(metricName.toString(), actualRequest.getMetricName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getLogMetricExceptionTest() throws Exception { + void getLogMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]"); client.getLogMetric(metricName); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void getLogMetricTest2() throws Exception { + void getLogMetricTest2() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -249,35 +249,35 @@ public void getLogMetricTest2() throws Exception { String metricName = "metricName-610759589"; LogMetric actualResponse = client.getLogMetric(metricName); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); GetLogMetricRequest actualRequest = ((GetLogMetricRequest) actualRequests.get(0)); - Assert.assertEquals(metricName, actualRequest.getMetricName()); - Assert.assertTrue( + Assertions.assertEquals(metricName, actualRequest.getMetricName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void getLogMetricExceptionTest2() throws Exception { + void getLogMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { String metricName = "metricName-610759589"; client.getLogMetric(metricName); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createLogMetricTest() throws Exception { + void createLogMetricTest() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -298,22 +298,22 @@ public void createLogMetricTest() throws Exception { LogMetric metric = LogMetric.newBuilder().build(); LogMetric actualResponse = client.createLogMetric(parent, metric); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateLogMetricRequest actualRequest = ((CreateLogMetricRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(metric, actualRequest.getMetric()); - Assert.assertTrue( + Assertions.assertEquals(parent.toString(), actualRequest.getParent()); + Assertions.assertEquals(metric, actualRequest.getMetric()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createLogMetricExceptionTest() throws Exception { + void createLogMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); @@ -321,14 +321,14 @@ public void createLogMetricExceptionTest() throws Exception { ProjectName parent = ProjectName.of("[PROJECT]"); LogMetric metric = LogMetric.newBuilder().build(); client.createLogMetric(parent, metric); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createLogMetricTest2() throws Exception { + void createLogMetricTest2() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -349,22 +349,22 @@ public void createLogMetricTest2() throws Exception { LogMetric metric = LogMetric.newBuilder().build(); LogMetric actualResponse = client.createLogMetric(parent, metric); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); CreateLogMetricRequest actualRequest = ((CreateLogMetricRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(metric, actualRequest.getMetric()); - Assert.assertTrue( + Assertions.assertEquals(parent, actualRequest.getParent()); + Assertions.assertEquals(metric, actualRequest.getMetric()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void createLogMetricExceptionTest2() throws Exception { + void createLogMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); @@ -372,14 +372,14 @@ public void createLogMetricExceptionTest2() throws Exception { String parent = "parent-995424086"; LogMetric metric = LogMetric.newBuilder().build(); client.createLogMetric(parent, metric); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateLogMetricTest() throws Exception { + void updateLogMetricTest() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -400,22 +400,22 @@ public void updateLogMetricTest() throws Exception { LogMetric metric = LogMetric.newBuilder().build(); LogMetric actualResponse = client.updateLogMetric(metricName, metric); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateLogMetricRequest actualRequest = ((UpdateLogMetricRequest) actualRequests.get(0)); - Assert.assertEquals(metricName.toString(), actualRequest.getMetricName()); - Assert.assertEquals(metric, actualRequest.getMetric()); - Assert.assertTrue( + Assertions.assertEquals(metricName.toString(), actualRequest.getMetricName()); + Assertions.assertEquals(metric, actualRequest.getMetric()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateLogMetricExceptionTest() throws Exception { + void updateLogMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); @@ -423,14 +423,14 @@ public void updateLogMetricExceptionTest() throws Exception { LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]"); LogMetric metric = LogMetric.newBuilder().build(); client.updateLogMetric(metricName, metric); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void updateLogMetricTest2() throws Exception { + void updateLogMetricTest2() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -451,22 +451,22 @@ public void updateLogMetricTest2() throws Exception { LogMetric metric = LogMetric.newBuilder().build(); LogMetric actualResponse = client.updateLogMetric(metricName, metric); - Assert.assertEquals(expectedResponse, actualResponse); + Assertions.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); UpdateLogMetricRequest actualRequest = ((UpdateLogMetricRequest) actualRequests.get(0)); - Assert.assertEquals(metricName, actualRequest.getMetricName()); - Assert.assertEquals(metric, actualRequest.getMetric()); - Assert.assertTrue( + Assertions.assertEquals(metricName, actualRequest.getMetricName()); + Assertions.assertEquals(metric, actualRequest.getMetric()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void updateLogMetricExceptionTest2() throws Exception { + void updateLogMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); @@ -474,14 +474,14 @@ public void updateLogMetricExceptionTest2() throws Exception { String metricName = "metricName-610759589"; LogMetric metric = LogMetric.newBuilder().build(); client.updateLogMetric(metricName, metric); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void deleteLogMetricTest() throws Exception { + void deleteLogMetricTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockMetricsServiceV2.addResponse(expectedResponse); @@ -490,32 +490,32 @@ public void deleteLogMetricTest() throws Exception { client.deleteLogMetric(metricName); List actualRequests = mockMetricsServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteLogMetricRequest actualRequest = ((DeleteLogMetricRequest) actualRequests.get(0)); - Assert.assertEquals(metricName.toString(), actualRequest.getMetricName()); - Assert.assertTrue( + Assertions.assertEquals(metricName.toString(), actualRequest.getMetricName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteLogMetricExceptionTest() throws Exception { + void deleteLogMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]"); client.deleteLogMetric(metricName); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void deleteLogMetricTest2() throws Exception { + void deleteLogMetricTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockMetricsServiceV2.addResponse(expectedResponse); @@ -524,25 +524,25 @@ public void deleteLogMetricTest2() throws Exception { client.deleteLogMetric(metricName); List actualRequests = mockMetricsServiceV2.getRequests(); - Assert.assertEquals(1, actualRequests.size()); + Assertions.assertEquals(1, actualRequests.size()); DeleteLogMetricRequest actualRequest = ((DeleteLogMetricRequest) actualRequests.get(0)); - Assert.assertEquals(metricName, actualRequest.getMetricName()); - Assert.assertTrue( + Assertions.assertEquals(metricName, actualRequest.getMetricName()); + Assertions.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - public void deleteLogMetricExceptionTest2() throws Exception { + void deleteLogMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { String metricName = "metricName-610759589"; client.deleteLogMetric(metricName); - Assert.fail("No exception raised"); + Assertions.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } diff --git a/pom.xml b/pom.xml index 32944a849..fbc9a50e8 100644 --- a/pom.xml +++ b/pom.xml @@ -102,10 +102,11 @@ - junit - junit - 4.13.2 - test + org.junit + junit-bom + 5.10.1 + pom + import org.easymock diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index d5934cfad..6c86a5622 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -33,9 +33,15 @@ - junit - junit - 4.13.2 + org.junit.jupiter + junit-jupiter-api + 5.10.1 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.10.1 test diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 4d358e923..a37ac2e1f 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -43,9 +43,15 @@ - junit - junit - 4.13.2 + org.junit.jupiter + junit-jupiter-api + 5.10.1 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.10.1 test @@ -101,12 +107,6 @@ native - - org.junit.vintage - junit-vintage-engine - 5.10.2 - test - org.graalvm.buildtools junit-platform-native diff --git a/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java b/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java index 6a4ba67ca..90ee29b39 100644 --- a/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java +++ b/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java @@ -18,18 +18,30 @@ import static com.google.common.truth.Truth.assertThat; -import com.google.cloud.testing.junit4.StdOutCaptureRule; -import org.junit.Rule; -import org.junit.Test; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -public class ITNativeImageLoggingSample { +class ITNativeImageLoggingSample { - @Rule public StdOutCaptureRule stdOut = new StdOutCaptureRule(); + private final ByteArrayOutputStream stdOutCaptor = new ByteArrayOutputStream(); + private final PrintStream originalStdOut = System.out; - @Test - public void testLogging() throws Exception { + @BeforeEach + void setUp() { + System.setOut(new PrintStream(stdOutCaptor)); + } + + @AfterEach + void tearDown() { + System.setOut(originalStdOut); + } + + @Test void testLogging() throws Exception { NativeImageLoggingSample.main(new String[] {}); - assertThat(stdOut.getCapturedOutputAsUtf8String()) + assertThat(stdOutCaptor.toString("UTF-8")) .contains("Logged: This is a log produced by Native Image."); } -} +} \ No newline at end of file diff --git a/samples/pom.xml b/samples/pom.xml index db6680766..65ee581d7 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -57,9 +57,15 @@ - junit - junit - 4.13.2 + org.junit.jupiter + junit-jupiter-api + 5.10.1 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.10.1 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 153333434..c08edeaa7 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -32,9 +32,15 @@ - junit - junit - 4.13.2 + org.junit.jupiter + junit-jupiter-api + 5.10.1 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.10.1 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 14433b368..079789136 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -44,9 +44,15 @@ - junit - junit - 4.13.2 + org.junit.jupiter + junit-jupiter-api + 5.10.1 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.10.1 test diff --git a/samples/snippets/src/test/java/com/example/logging/LoggingIT.java b/samples/snippets/src/test/java/com/example/logging/LoggingIT.java index d1ebdcd4d..d3121257a 100644 --- a/samples/snippets/src/test/java/com/example/logging/LoggingIT.java +++ b/samples/snippets/src/test/java/com/example/logging/LoggingIT.java @@ -29,18 +29,20 @@ import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.Collections; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.extension.ExtendWith; /** Tests for quickstart sample. */ -@RunWith(JUnit4.class) + @SuppressWarnings("checkstyle:abbreviationaswordinname") -public class LoggingIT { +class LoggingIT { private static final String TEST_LOG = formatForTest("test-log"); private static final String STRING_PAYLOAD = "Hello, world!"; @@ -67,38 +69,38 @@ private void deleteLog(String logName) throws InterruptedException { } } - @BeforeClass + @BeforeAll public static void startup() { logging = LoggingOptions.getDefaultInstance().getService(); } - @AfterClass + @AfterAll public static void shutDown() throws Exception { logging.close(); } - @Before - public void setUp() { + @BeforeEach void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); System.setOut(out); } - @After - public void tearDown() throws Exception { + @AfterEach void tearDown() throws Exception { // Clean up created logs deleteLog(TEST_LOG); System.setOut(null); } - @Test(timeout = 60000) + @Test + @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) public void testQuickstartSample() throws Exception { QuickstartSample.main(TEST_LOG); String got = bout.toString(); assertThat(got).contains(String.format("Logged: %s", STRING_PAYLOAD)); } - @Test(timeout = 60000) + @Test + @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) public void testListLogEntriesSample() throws Exception { // write a log entry LogEntry entry = @@ -123,7 +125,8 @@ public void testListLogEntriesSample() throws Exception { assertThat(bout.toString().contains(STRING_PAYLOAD2)).isTrue(); } - @Test(timeout = 60000) + @Test + @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) public void testWriteLogHttpRequestSample() throws Exception { HttpRequest request = HttpRequest.newBuilder() @@ -150,14 +153,16 @@ public void testWriteLogHttpRequestSample() throws Exception { assertThat(bout.toString().contains(request.toString())).isTrue(); } - @Test(timeout = 60000) + @Test + @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) public void testWriteLogEntrySample() throws Exception { WriteLogEntry.main(new String[] {TEST_LOG}); String got = bout.toString(); assertThat(got).contains(String.format("Wrote to %s", TEST_LOG)); } - @Test(timeout = 60000) + @Test + @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) public void testTailLogEntriesSample() throws Exception { Runnable task = () -> { diff --git a/samples/snippets/src/test/java/com/example/logging/LogsIT.java b/samples/snippets/src/test/java/com/example/logging/LogsIT.java index 181ba2f3c..355f27315 100644 --- a/samples/snippets/src/test/java/com/example/logging/LogsIT.java +++ b/samples/snippets/src/test/java/com/example/logging/LogsIT.java @@ -20,29 +20,30 @@ import java.io.ByteArrayOutputStream; import java.io.PrintStream; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; +import java.util.concurrent.TimeUnit; -public class LogsIT { +class LogsIT { private static final String GOOGLEAPIS_AUDIT_LOGNAME = "cloudaudit.googleapis.com%2Factivity"; private ByteArrayOutputStream bout; private PrintStream out; - @Before - public void setUp() { + @BeforeEach void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); System.setOut(out); } - @After - public void tearDown() { + @AfterEach void tearDown() { System.setOut(null); } - @Test(timeout = 60000) + @Test + @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) public void testListLogNamesSample() throws Exception { ListLogs.main(); // Check for mocked STDOUT having data diff --git a/samples/snippets/src/test/java/com/example/logging/SinkIT.java b/samples/snippets/src/test/java/com/example/logging/SinkIT.java index bcc4de6e1..1f66ecd16 100644 --- a/samples/snippets/src/test/java/com/example/logging/SinkIT.java +++ b/samples/snippets/src/test/java/com/example/logging/SinkIT.java @@ -16,8 +16,8 @@ package com.example.logging; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.cloud.logging.Logging; import com.google.cloud.logging.LoggingOptions; @@ -26,21 +26,20 @@ import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.UUID; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.extension.ExtendWith; /** Tests for sink sample. */ -@RunWith(JUnit4.class) -public class SinkIT { + +class SinkIT { private Logging logging = LoggingOptions.getDefaultInstance().getService(); private static final String SINK_NAME = "test-sink" + UUID.randomUUID().toString(); - @Before - public void setUp() { + @BeforeEach void setUp() { // Create sink logging.create( SinkInfo.newBuilder(SINK_NAME, SinkInfo.Destination.DatasetDestination.of("dataset")) @@ -49,15 +48,13 @@ public void setUp() { .build()); } - @After - public void tearDown() throws Exception { + @AfterEach void tearDown() throws Exception { // Delete sink logging.deleteSink(SINK_NAME); logging.close(); } - @Test - public void testGetSinkMetadata() throws Exception { + @Test void testGetSinkMetadata() throws Exception { Sink sink = logging.getSink(SINK_NAME); assertNotNull(sink); PrintStream standardOut = System.out; From c4d3b6ee92d3d9a25863b6b9220ed1cd3471fa86 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 1 Jan 2026 14:52:29 -0500 Subject: [PATCH 2/8] chore: Fix junit migration issues --- .../java/com/google/cloud/logging/ContextHandlerTest.java | 2 +- .../java/com/google/cloud/logging/LoggingHandlerTest.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextHandlerTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextHandlerTest.java index 10cfce9f2..504798f0c 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextHandlerTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/ContextHandlerTest.java @@ -16,7 +16,7 @@ package com.google.cloud.logging; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; import com.google.cloud.logging.ContextHandler.ContextPriority; import com.google.cloud.logging.HttpRequest.RequestMethod; diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingHandlerTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingHandlerTest.java index ffce6f426..d107748fd 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingHandlerTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingHandlerTest.java @@ -238,11 +238,6 @@ static class CustomLevel extends Level { public final OutputStreamPatcher outputStreamPatcher = new OutputStreamPatcher(); - @org.junit.jupiter.api.AfterEach - void tearDownPatcher() { - outputStreamPatcher.after(); - } - @BeforeEach void setUp() { Instrumentation.setInstrumentationStatus(true); @@ -260,6 +255,7 @@ void setUp() { @AfterEach void after() { verify(logging, options); + outputStreamPatcher.after(); } private static LogRecord newLogRecord(Level level, String message) { From 0b2616d8db8e98874e967c3c985f0038cd907a33 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 1 Jan 2026 15:07:20 -0500 Subject: [PATCH 3/8] chore: revert generated tests to junit4 and fix static imports --- google-cloud-logging/pom.xml | 5 + .../logging/AutoPopulateMetadataTests.java | 4 +- .../cloud/logging/InstrumentationTest.java | 22 +- .../com/google/cloud/logging/OptionTest.java | 4 +- .../cloud/logging/it/ITTracingLogsTest.java | 4 +- .../cloud/logging/v2/ConfigClientTest.java | 1064 ++++++++--------- .../cloud/logging/v2/LoggingClientTest.java | 222 ++-- .../cloud/logging/v2/MetricsClientTest.java | 174 +-- 8 files changed, 755 insertions(+), 744 deletions(-) diff --git a/google-cloud-logging/pom.xml b/google-cloud-logging/pom.xml index 00287ace0..78376d527 100644 --- a/google-cloud-logging/pom.xml +++ b/google-cloud-logging/pom.xml @@ -123,6 +123,11 @@ junit-jupiter-params test + + org.junit.vintage + junit-vintage-engine + test + org.easymock easymock diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/AutoPopulateMetadataTests.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/AutoPopulateMetadataTests.java index e65567f16..5b89f7271 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/AutoPopulateMetadataTests.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/AutoPopulateMetadataTests.java @@ -22,7 +22,9 @@ import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.newCapture; import static org.easymock.EasyMock.replay; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; import com.google.api.core.ApiFutures; import com.google.cloud.MonitoredResource; diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java index 7aba605f1..075e23d0d 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java @@ -16,7 +16,10 @@ package com.google.cloud.logging; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.api.client.util.Lists; import com.google.cloud.Tuple; @@ -30,7 +33,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; class InstrumentationTest { @@ -60,8 +62,8 @@ void testNoInstrumentationGenerated() { Tuple> pair = Instrumentation.populateInstrumentationInfo(ImmutableList.of(STRING_ENTRY)); ArrayList entries = Lists.newArrayList(pair.y()); - Assertions.assertFalse(pair.x()); - Assertions.assertEquals(1, entries.size()); + assertFalse(pair.x()); + assertEquals(1, entries.size()); assertSame(Payload.Type.STRING, entries.get(0).getPayload().getType()); } @@ -120,8 +122,8 @@ private static void verifyEntries( HashSet names, HashSet versions) { ArrayList entries = Lists.newArrayList(pair.y()); - Assertions.assertTrue(pair.x()); - Assertions.assertEquals(expected, entries.size()); + assertTrue(pair.x()); + assertEquals(expected, entries.size()); assertSame(Payload.Type.JSON, entries.get(index).getPayload().getType()); ListValue infoList = entries @@ -133,18 +135,18 @@ private static void verifyEntries( .getFieldsOrThrow(Instrumentation.INSTRUMENTATION_SOURCE_KEY) .getListValue(); for (Value val : infoList.getValuesList()) { - Assertions.assertTrue( + assertTrue( names.remove( val.getStructValue() .getFieldsOrThrow(Instrumentation.INSTRUMENTATION_NAME_KEY) .getStringValue())); - Assertions.assertTrue( + assertTrue( versions.remove( val.getStructValue() .getFieldsOrThrow(Instrumentation.INSTRUMENTATION_VERSION_KEY) .getStringValue())); } - Assertions.assertEquals(0, names.size()); - Assertions.assertEquals(0, versions.size()); + assertEquals(0, names.size()); + assertEquals(0, versions.size()); } -} +} \ No newline at end of file diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/OptionTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/OptionTest.java index 4a154e464..e7907f4a3 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/OptionTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/OptionTest.java @@ -18,11 +18,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.fail; import com.google.cloud.logging.Logging.ListOption; import com.google.cloud.logging.Option.OptionType; import com.google.common.testing.EqualsTester; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; class OptionTest { @@ -54,7 +54,7 @@ void testConstructor() { assertNull(option.getValue()); try { new Option(null, VALUE) {}; - Assertions.fail(); + fail(); } catch (NullPointerException expected) { } diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTracingLogsTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTracingLogsTest.java index c08f3964a..05effe16d 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTracingLogsTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/it/ITTracingLogsTest.java @@ -18,7 +18,9 @@ import static com.google.cloud.logging.testing.RemoteLoggingHelper.formatForTest; import static com.google.common.truth.Truth.assertThat; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.cloud.MonitoredResource; import com.google.cloud.logging.*; diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java index 9c9ba5b6a..b967edd96 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java @@ -106,21 +106,21 @@ import java.util.UUID; import java.util.concurrent.ExecutionException; import javax.annotation.Generated; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; +import org.junit.AfterClass; +import org.junit.After; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.Test; @Generated("by gapic-generator-java") -class ConfigClientTest { +public class ConfigClientTest { private static MockConfigServiceV2 mockConfigServiceV2; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private ConfigClient client; - @BeforeAll + @BeforeClass public static void startStaticServer() { mockConfigServiceV2 = new MockConfigServiceV2(); mockServiceHelper = @@ -129,13 +129,13 @@ public static void startStaticServer() { mockServiceHelper.start(); } - @AfterAll + @AfterClass public static void stopServer() { mockServiceHelper.stop(); } - @BeforeEach - void setUp() throws IOException { + @Before + public void setUp() throws IOException { mockServiceHelper.reset(); channelProvider = mockServiceHelper.createChannelProvider(); ConfigSettings settings = @@ -146,13 +146,13 @@ void setUp() throws IOException { client = ConfigClient.create(settings); } - @AfterEach - void tearDown() throws Exception { + @After + public void tearDown() throws Exception { client.close(); } @Test - void listBucketsTest() throws Exception { + public void listBucketsTest() throws Exception { LogBucket responsesElement = LogBucket.newBuilder().build(); ListBucketsResponse expectedResponse = ListBucketsResponse.newBuilder() @@ -168,22 +168,22 @@ void listBucketsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listBucketsExceptionTest() throws Exception { + public void listBucketsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -191,14 +191,14 @@ void listBucketsExceptionTest() throws Exception { BillingAccountLocationName parent = BillingAccountLocationName.of("[BILLING_ACCOUNT]", "[LOCATION]"); client.listBuckets(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listBucketsTest2() throws Exception { + public void listBucketsTest2() throws Exception { LogBucket responsesElement = LogBucket.newBuilder().build(); ListBucketsResponse expectedResponse = ListBucketsResponse.newBuilder() @@ -213,36 +213,36 @@ void listBucketsTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listBucketsExceptionTest2() throws Exception { + public void listBucketsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); client.listBuckets(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listBucketsTest3() throws Exception { + public void listBucketsTest3() throws Exception { LogBucket responsesElement = LogBucket.newBuilder().build(); ListBucketsResponse expectedResponse = ListBucketsResponse.newBuilder() @@ -257,36 +257,36 @@ void listBucketsTest3() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listBucketsExceptionTest3() throws Exception { + public void listBucketsExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); client.listBuckets(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listBucketsTest4() throws Exception { + public void listBucketsTest4() throws Exception { LogBucket responsesElement = LogBucket.newBuilder().build(); ListBucketsResponse expectedResponse = ListBucketsResponse.newBuilder() @@ -301,36 +301,36 @@ void listBucketsTest4() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listBucketsExceptionTest4() throws Exception { + public void listBucketsExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); client.listBuckets(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listBucketsTest5() throws Exception { + public void listBucketsTest5() throws Exception { LogBucket responsesElement = LogBucket.newBuilder().build(); ListBucketsResponse expectedResponse = ListBucketsResponse.newBuilder() @@ -345,36 +345,36 @@ void listBucketsTest5() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listBucketsExceptionTest5() throws Exception { + public void listBucketsExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listBuckets(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getBucketTest() throws Exception { + public void getBucketTest() throws Exception { LogBucket expectedResponse = LogBucket.newBuilder() .setName( @@ -401,21 +401,21 @@ void getBucketTest() throws Exception { .build(); LogBucket actualResponse = client.getBucket(request); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetBucketRequest actualRequest = ((GetBucketRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getBucketExceptionTest() throws Exception { + public void getBucketExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -427,14 +427,14 @@ void getBucketExceptionTest() throws Exception { .toString()) .build(); client.getBucket(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createBucketAsyncTest() throws Exception { + public void createBucketAsyncTest() throws Exception { LogBucket expectedResponse = LogBucket.newBuilder() .setName( @@ -467,23 +467,23 @@ void createBucketAsyncTest() throws Exception { .build(); LogBucket actualResponse = client.createBucketAsyncAsync(request).get(); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateBucketRequest actualRequest = ((CreateBucketRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getParent(), actualRequest.getParent()); - Assertions.assertEquals(request.getBucketId(), actualRequest.getBucketId()); - Assertions.assertEquals(request.getBucket(), actualRequest.getBucket()); - Assertions.assertTrue( + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getBucketId(), actualRequest.getBucketId()); + Assert.assertEquals(request.getBucket(), actualRequest.getBucket()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createBucketAsyncExceptionTest() throws Exception { + public void createBucketAsyncExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -495,17 +495,17 @@ void createBucketAsyncExceptionTest() throws Exception { .setBucket(LogBucket.newBuilder().build()) .build(); client.createBucketAsyncAsync(request).get(); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (ExecutionException e) { - Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assertions.assertEquals( + Assert.assertEquals( StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - void updateBucketAsyncTest() throws Exception { + public void updateBucketAsyncTest() throws Exception { LogBucket expectedResponse = LogBucket.newBuilder() .setName( @@ -540,23 +540,23 @@ void updateBucketAsyncTest() throws Exception { .build(); LogBucket actualResponse = client.updateBucketAsyncAsync(request).get(); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateBucketRequest actualRequest = ((UpdateBucketRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertEquals(request.getBucket(), actualRequest.getBucket()); - Assertions.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getBucket(), actualRequest.getBucket()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateBucketAsyncExceptionTest() throws Exception { + public void updateBucketAsyncExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -570,17 +570,17 @@ void updateBucketAsyncExceptionTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .build(); client.updateBucketAsyncAsync(request).get(); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (ExecutionException e) { - Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assertions.assertEquals( + Assert.assertEquals( StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - void createBucketTest() throws Exception { + public void createBucketTest() throws Exception { LogBucket expectedResponse = LogBucket.newBuilder() .setName( @@ -607,23 +607,23 @@ void createBucketTest() throws Exception { .build(); LogBucket actualResponse = client.createBucket(request); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateBucketRequest actualRequest = ((CreateBucketRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getParent(), actualRequest.getParent()); - Assertions.assertEquals(request.getBucketId(), actualRequest.getBucketId()); - Assertions.assertEquals(request.getBucket(), actualRequest.getBucket()); - Assertions.assertTrue( + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getBucketId(), actualRequest.getBucketId()); + Assert.assertEquals(request.getBucket(), actualRequest.getBucket()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createBucketExceptionTest() throws Exception { + public void createBucketExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -635,14 +635,14 @@ void createBucketExceptionTest() throws Exception { .setBucket(LogBucket.newBuilder().build()) .build(); client.createBucket(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateBucketTest() throws Exception { + public void updateBucketTest() throws Exception { LogBucket expectedResponse = LogBucket.newBuilder() .setName( @@ -671,23 +671,23 @@ void updateBucketTest() throws Exception { .build(); LogBucket actualResponse = client.updateBucket(request); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateBucketRequest actualRequest = ((UpdateBucketRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertEquals(request.getBucket(), actualRequest.getBucket()); - Assertions.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getBucket(), actualRequest.getBucket()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateBucketExceptionTest() throws Exception { + public void updateBucketExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -701,14 +701,14 @@ void updateBucketExceptionTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .build(); client.updateBucket(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void deleteBucketTest() throws Exception { + public void deleteBucketTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -722,18 +722,18 @@ void deleteBucketTest() throws Exception { client.deleteBucket(request); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteBucketRequest actualRequest = ((DeleteBucketRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteBucketExceptionTest() throws Exception { + public void deleteBucketExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -745,14 +745,14 @@ void deleteBucketExceptionTest() throws Exception { .toString()) .build(); client.deleteBucket(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void undeleteBucketTest() throws Exception { + public void undeleteBucketTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -766,18 +766,18 @@ void undeleteBucketTest() throws Exception { client.undeleteBucket(request); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UndeleteBucketRequest actualRequest = ((UndeleteBucketRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void undeleteBucketExceptionTest() throws Exception { + public void undeleteBucketExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -789,14 +789,14 @@ void undeleteBucketExceptionTest() throws Exception { .toString()) .build(); client.undeleteBucket(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listViewsTest() throws Exception { + public void listViewsTest() throws Exception { LogView responsesElement = LogView.newBuilder().build(); ListViewsResponse expectedResponse = ListViewsResponse.newBuilder() @@ -811,36 +811,36 @@ void listViewsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getViewsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getViewsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListViewsRequest actualRequest = ((ListViewsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listViewsExceptionTest() throws Exception { + public void listViewsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listViews(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getViewTest() throws Exception { + public void getViewTest() throws Exception { LogView expectedResponse = LogView.newBuilder() .setName( @@ -863,21 +863,21 @@ void getViewTest() throws Exception { .build(); LogView actualResponse = client.getView(request); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetViewRequest actualRequest = ((GetViewRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getViewExceptionTest() throws Exception { + public void getViewExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -890,14 +890,14 @@ void getViewExceptionTest() throws Exception { .toString()) .build(); client.getView(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createViewTest() throws Exception { + public void createViewTest() throws Exception { LogView expectedResponse = LogView.newBuilder() .setName( @@ -919,23 +919,23 @@ void createViewTest() throws Exception { .build(); LogView actualResponse = client.createView(request); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateViewRequest actualRequest = ((CreateViewRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getParent(), actualRequest.getParent()); - Assertions.assertEquals(request.getViewId(), actualRequest.getViewId()); - Assertions.assertEquals(request.getView(), actualRequest.getView()); - Assertions.assertTrue( + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getViewId(), actualRequest.getViewId()); + Assert.assertEquals(request.getView(), actualRequest.getView()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createViewExceptionTest() throws Exception { + public void createViewExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -947,14 +947,14 @@ void createViewExceptionTest() throws Exception { .setView(LogView.newBuilder().build()) .build(); client.createView(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateViewTest() throws Exception { + public void updateViewTest() throws Exception { LogView expectedResponse = LogView.newBuilder() .setName( @@ -976,23 +976,23 @@ void updateViewTest() throws Exception { .build(); LogView actualResponse = client.updateView(request); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateViewRequest actualRequest = ((UpdateViewRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertEquals(request.getView(), actualRequest.getView()); - Assertions.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getView(), actualRequest.getView()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateViewExceptionTest() throws Exception { + public void updateViewExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1004,14 +1004,14 @@ void updateViewExceptionTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .build(); client.updateView(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void deleteViewTest() throws Exception { + public void deleteViewTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -1026,18 +1026,18 @@ void deleteViewTest() throws Exception { client.deleteView(request); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteViewRequest actualRequest = ((DeleteViewRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteViewExceptionTest() throws Exception { + public void deleteViewExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1050,14 +1050,14 @@ void deleteViewExceptionTest() throws Exception { .toString()) .build(); client.deleteView(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listSinksTest() throws Exception { + public void listSinksTest() throws Exception { LogSink responsesElement = LogSink.newBuilder().build(); ListSinksResponse expectedResponse = ListSinksResponse.newBuilder() @@ -1072,36 +1072,36 @@ void listSinksTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListSinksRequest actualRequest = ((ListSinksRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listSinksExceptionTest() throws Exception { + public void listSinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]"); client.listSinks(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listSinksTest2() throws Exception { + public void listSinksTest2() throws Exception { LogSink responsesElement = LogSink.newBuilder().build(); ListSinksResponse expectedResponse = ListSinksResponse.newBuilder() @@ -1116,36 +1116,36 @@ void listSinksTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListSinksRequest actualRequest = ((ListSinksRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listSinksExceptionTest2() throws Exception { + public void listSinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { FolderName parent = FolderName.of("[FOLDER]"); client.listSinks(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listSinksTest3() throws Exception { + public void listSinksTest3() throws Exception { LogSink responsesElement = LogSink.newBuilder().build(); ListSinksResponse expectedResponse = ListSinksResponse.newBuilder() @@ -1160,36 +1160,36 @@ void listSinksTest3() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListSinksRequest actualRequest = ((ListSinksRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listSinksExceptionTest3() throws Exception { + public void listSinksExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); client.listSinks(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listSinksTest4() throws Exception { + public void listSinksTest4() throws Exception { LogSink responsesElement = LogSink.newBuilder().build(); ListSinksResponse expectedResponse = ListSinksResponse.newBuilder() @@ -1204,36 +1204,36 @@ void listSinksTest4() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListSinksRequest actualRequest = ((ListSinksRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listSinksExceptionTest4() throws Exception { + public void listSinksExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { ProjectName parent = ProjectName.of("[PROJECT]"); client.listSinks(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listSinksTest5() throws Exception { + public void listSinksTest5() throws Exception { LogSink responsesElement = LogSink.newBuilder().build(); ListSinksResponse expectedResponse = ListSinksResponse.newBuilder() @@ -1248,36 +1248,36 @@ void listSinksTest5() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListSinksRequest actualRequest = ((ListSinksRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listSinksExceptionTest5() throws Exception { + public void listSinksExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listSinks(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getSinkTest() throws Exception { + public void getSinkTest() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1296,35 +1296,35 @@ void getSinkTest() throws Exception { LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]"); LogSink actualResponse = client.getSink(sinkName); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetSinkRequest actualRequest = ((GetSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(sinkName.toString(), actualRequest.getSinkName()); - Assertions.assertTrue( + Assert.assertEquals(sinkName.toString(), actualRequest.getSinkName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getSinkExceptionTest() throws Exception { + public void getSinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]"); client.getSink(sinkName); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getSinkTest2() throws Exception { + public void getSinkTest2() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1343,35 +1343,35 @@ void getSinkTest2() throws Exception { String sinkName = "sinkName508775358"; LogSink actualResponse = client.getSink(sinkName); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetSinkRequest actualRequest = ((GetSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(sinkName, actualRequest.getSinkName()); - Assertions.assertTrue( + Assert.assertEquals(sinkName, actualRequest.getSinkName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getSinkExceptionTest2() throws Exception { + public void getSinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String sinkName = "sinkName508775358"; client.getSink(sinkName); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createSinkTest() throws Exception { + public void createSinkTest() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1391,22 +1391,22 @@ void createSinkTest() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.createSink(parent, sink); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateSinkRequest actualRequest = ((CreateSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertEquals(sink, actualRequest.getSink()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(sink, actualRequest.getSink()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createSinkExceptionTest() throws Exception { + public void createSinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1414,14 +1414,14 @@ void createSinkExceptionTest() throws Exception { BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]"); LogSink sink = LogSink.newBuilder().build(); client.createSink(parent, sink); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createSinkTest2() throws Exception { + public void createSinkTest2() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1441,22 +1441,22 @@ void createSinkTest2() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.createSink(parent, sink); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateSinkRequest actualRequest = ((CreateSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertEquals(sink, actualRequest.getSink()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(sink, actualRequest.getSink()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createSinkExceptionTest2() throws Exception { + public void createSinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1464,14 +1464,14 @@ void createSinkExceptionTest2() throws Exception { FolderName parent = FolderName.of("[FOLDER]"); LogSink sink = LogSink.newBuilder().build(); client.createSink(parent, sink); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createSinkTest3() throws Exception { + public void createSinkTest3() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1491,22 +1491,22 @@ void createSinkTest3() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.createSink(parent, sink); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateSinkRequest actualRequest = ((CreateSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertEquals(sink, actualRequest.getSink()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(sink, actualRequest.getSink()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createSinkExceptionTest3() throws Exception { + public void createSinkExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1514,14 +1514,14 @@ void createSinkExceptionTest3() throws Exception { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); LogSink sink = LogSink.newBuilder().build(); client.createSink(parent, sink); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createSinkTest4() throws Exception { + public void createSinkTest4() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1541,22 +1541,22 @@ void createSinkTest4() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.createSink(parent, sink); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateSinkRequest actualRequest = ((CreateSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertEquals(sink, actualRequest.getSink()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(sink, actualRequest.getSink()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createSinkExceptionTest4() throws Exception { + public void createSinkExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1564,14 +1564,14 @@ void createSinkExceptionTest4() throws Exception { ProjectName parent = ProjectName.of("[PROJECT]"); LogSink sink = LogSink.newBuilder().build(); client.createSink(parent, sink); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createSinkTest5() throws Exception { + public void createSinkTest5() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1591,22 +1591,22 @@ void createSinkTest5() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.createSink(parent, sink); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateSinkRequest actualRequest = ((CreateSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertEquals(sink, actualRequest.getSink()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(sink, actualRequest.getSink()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createSinkExceptionTest5() throws Exception { + public void createSinkExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1614,14 +1614,14 @@ void createSinkExceptionTest5() throws Exception { String parent = "parent-995424086"; LogSink sink = LogSink.newBuilder().build(); client.createSink(parent, sink); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateSinkTest() throws Exception { + public void updateSinkTest() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1641,22 +1641,22 @@ void updateSinkTest() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.updateSink(sinkName, sink); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateSinkRequest actualRequest = ((UpdateSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(sinkName.toString(), actualRequest.getSinkName()); - Assertions.assertEquals(sink, actualRequest.getSink()); - Assertions.assertTrue( + Assert.assertEquals(sinkName.toString(), actualRequest.getSinkName()); + Assert.assertEquals(sink, actualRequest.getSink()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateSinkExceptionTest() throws Exception { + public void updateSinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1664,14 +1664,14 @@ void updateSinkExceptionTest() throws Exception { LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]"); LogSink sink = LogSink.newBuilder().build(); client.updateSink(sinkName, sink); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateSinkTest2() throws Exception { + public void updateSinkTest2() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1691,22 +1691,22 @@ void updateSinkTest2() throws Exception { LogSink sink = LogSink.newBuilder().build(); LogSink actualResponse = client.updateSink(sinkName, sink); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateSinkRequest actualRequest = ((UpdateSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(sinkName, actualRequest.getSinkName()); - Assertions.assertEquals(sink, actualRequest.getSink()); - Assertions.assertTrue( + Assert.assertEquals(sinkName, actualRequest.getSinkName()); + Assert.assertEquals(sink, actualRequest.getSink()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateSinkExceptionTest2() throws Exception { + public void updateSinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1714,14 +1714,14 @@ void updateSinkExceptionTest2() throws Exception { String sinkName = "sinkName508775358"; LogSink sink = LogSink.newBuilder().build(); client.updateSink(sinkName, sink); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateSinkTest3() throws Exception { + public void updateSinkTest3() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1742,23 +1742,23 @@ void updateSinkTest3() throws Exception { FieldMask updateMask = FieldMask.newBuilder().build(); LogSink actualResponse = client.updateSink(sinkName, sink, updateMask); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateSinkRequest actualRequest = ((UpdateSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(sinkName.toString(), actualRequest.getSinkName()); - Assertions.assertEquals(sink, actualRequest.getSink()); - Assertions.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assertions.assertTrue( + Assert.assertEquals(sinkName.toString(), actualRequest.getSinkName()); + Assert.assertEquals(sink, actualRequest.getSink()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateSinkExceptionTest3() throws Exception { + public void updateSinkExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1767,14 +1767,14 @@ void updateSinkExceptionTest3() throws Exception { LogSink sink = LogSink.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSink(sinkName, sink, updateMask); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateSinkTest4() throws Exception { + public void updateSinkTest4() throws Exception { LogSink expectedResponse = LogSink.newBuilder() .setName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()) @@ -1795,23 +1795,23 @@ void updateSinkTest4() throws Exception { FieldMask updateMask = FieldMask.newBuilder().build(); LogSink actualResponse = client.updateSink(sinkName, sink, updateMask); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateSinkRequest actualRequest = ((UpdateSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(sinkName, actualRequest.getSinkName()); - Assertions.assertEquals(sink, actualRequest.getSink()); - Assertions.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assertions.assertTrue( + Assert.assertEquals(sinkName, actualRequest.getSinkName()); + Assert.assertEquals(sink, actualRequest.getSink()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateSinkExceptionTest4() throws Exception { + public void updateSinkExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1820,14 +1820,14 @@ void updateSinkExceptionTest4() throws Exception { LogSink sink = LogSink.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSink(sinkName, sink, updateMask); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void deleteSinkTest() throws Exception { + public void deleteSinkTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -1836,32 +1836,32 @@ void deleteSinkTest() throws Exception { client.deleteSink(sinkName); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteSinkRequest actualRequest = ((DeleteSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(sinkName.toString(), actualRequest.getSinkName()); - Assertions.assertTrue( + Assert.assertEquals(sinkName.toString(), actualRequest.getSinkName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteSinkExceptionTest() throws Exception { + public void deleteSinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]"); client.deleteSink(sinkName); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void deleteSinkTest2() throws Exception { + public void deleteSinkTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -1870,32 +1870,32 @@ void deleteSinkTest2() throws Exception { client.deleteSink(sinkName); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteSinkRequest actualRequest = ((DeleteSinkRequest) actualRequests.get(0)); - Assertions.assertEquals(sinkName, actualRequest.getSinkName()); - Assertions.assertTrue( + Assert.assertEquals(sinkName, actualRequest.getSinkName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteSinkExceptionTest2() throws Exception { + public void deleteSinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String sinkName = "sinkName508775358"; client.deleteSink(sinkName); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createLinkTest() throws Exception { + public void createLinkTest() throws Exception { Link expectedResponse = Link.newBuilder() .setName( @@ -1921,23 +1921,23 @@ void createLinkTest() throws Exception { String linkId = "linkId-1102667083"; Link actualResponse = client.createLinkAsync(parent, link, linkId).get(); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateLinkRequest actualRequest = ((CreateLinkRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertEquals(link, actualRequest.getLink()); - Assertions.assertEquals(linkId, actualRequest.getLinkId()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(link, actualRequest.getLink()); + Assert.assertEquals(linkId, actualRequest.getLinkId()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createLinkExceptionTest() throws Exception { + public void createLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -1947,17 +1947,17 @@ void createLinkExceptionTest() throws Exception { Link link = Link.newBuilder().build(); String linkId = "linkId-1102667083"; client.createLinkAsync(parent, link, linkId).get(); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (ExecutionException e) { - Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assertions.assertEquals( + Assert.assertEquals( StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - void createLinkTest2() throws Exception { + public void createLinkTest2() throws Exception { Link expectedResponse = Link.newBuilder() .setName( @@ -1982,23 +1982,23 @@ void createLinkTest2() throws Exception { String linkId = "linkId-1102667083"; Link actualResponse = client.createLinkAsync(parent, link, linkId).get(); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateLinkRequest actualRequest = ((CreateLinkRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertEquals(link, actualRequest.getLink()); - Assertions.assertEquals(linkId, actualRequest.getLinkId()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(link, actualRequest.getLink()); + Assert.assertEquals(linkId, actualRequest.getLinkId()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createLinkExceptionTest2() throws Exception { + public void createLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2007,17 +2007,17 @@ void createLinkExceptionTest2() throws Exception { Link link = Link.newBuilder().build(); String linkId = "linkId-1102667083"; client.createLinkAsync(parent, link, linkId).get(); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (ExecutionException e) { - Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assertions.assertEquals( + Assert.assertEquals( StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - void deleteLinkTest() throws Exception { + public void deleteLinkTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = Operation.newBuilder() @@ -2033,18 +2033,18 @@ void deleteLinkTest() throws Exception { client.deleteLinkAsync(name).get(); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteLinkRequest actualRequest = ((DeleteLinkRequest) actualRequests.get(0)); - Assertions.assertEquals(name.toString(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteLinkExceptionTest() throws Exception { + public void deleteLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2052,17 +2052,17 @@ void deleteLinkExceptionTest() throws Exception { LinkName name = LinkName.ofProjectLocationBucketLinkName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[LINK]"); client.deleteLinkAsync(name).get(); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (ExecutionException e) { - Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assertions.assertEquals( + Assert.assertEquals( StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - void deleteLinkTest2() throws Exception { + public void deleteLinkTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = Operation.newBuilder() @@ -2077,35 +2077,35 @@ void deleteLinkTest2() throws Exception { client.deleteLinkAsync(name).get(); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteLinkRequest actualRequest = ((DeleteLinkRequest) actualRequests.get(0)); - Assertions.assertEquals(name, actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteLinkExceptionTest2() throws Exception { + public void deleteLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String name = "name3373707"; client.deleteLinkAsync(name).get(); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (ExecutionException e) { - Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assertions.assertEquals( + Assert.assertEquals( StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - void listLinksTest() throws Exception { + public void listLinksTest() throws Exception { Link responsesElement = Link.newBuilder().build(); ListLinksResponse expectedResponse = ListLinksResponse.newBuilder() @@ -2121,22 +2121,22 @@ void listLinksTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListLinksRequest actualRequest = ((ListLinksRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listLinksExceptionTest() throws Exception { + public void listLinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2144,14 +2144,14 @@ void listLinksExceptionTest() throws Exception { LogBucketName parent = LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]"); client.listLinks(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listLinksTest2() throws Exception { + public void listLinksTest2() throws Exception { Link responsesElement = Link.newBuilder().build(); ListLinksResponse expectedResponse = ListLinksResponse.newBuilder() @@ -2166,36 +2166,36 @@ void listLinksTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListLinksRequest actualRequest = ((ListLinksRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listLinksExceptionTest2() throws Exception { + public void listLinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listLinks(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getLinkTest() throws Exception { + public void getLinkTest() throws Exception { Link expectedResponse = Link.newBuilder() .setName( @@ -2213,21 +2213,21 @@ void getLinkTest() throws Exception { LinkName.ofProjectLocationBucketLinkName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[LINK]"); Link actualResponse = client.getLink(name); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetLinkRequest actualRequest = ((GetLinkRequest) actualRequests.get(0)); - Assertions.assertEquals(name.toString(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getLinkExceptionTest() throws Exception { + public void getLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2235,14 +2235,14 @@ void getLinkExceptionTest() throws Exception { LinkName name = LinkName.ofProjectLocationBucketLinkName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[LINK]"); client.getLink(name); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getLinkTest2() throws Exception { + public void getLinkTest2() throws Exception { Link expectedResponse = Link.newBuilder() .setName( @@ -2259,35 +2259,35 @@ void getLinkTest2() throws Exception { String name = "name3373707"; Link actualResponse = client.getLink(name); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetLinkRequest actualRequest = ((GetLinkRequest) actualRequests.get(0)); - Assertions.assertEquals(name, actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getLinkExceptionTest2() throws Exception { + public void getLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String name = "name3373707"; client.getLink(name); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listExclusionsTest() throws Exception { + public void listExclusionsTest() throws Exception { LogExclusion responsesElement = LogExclusion.newBuilder().build(); ListExclusionsResponse expectedResponse = ListExclusionsResponse.newBuilder() @@ -2302,36 +2302,36 @@ void listExclusionsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListExclusionsRequest actualRequest = ((ListExclusionsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listExclusionsExceptionTest() throws Exception { + public void listExclusionsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]"); client.listExclusions(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listExclusionsTest2() throws Exception { + public void listExclusionsTest2() throws Exception { LogExclusion responsesElement = LogExclusion.newBuilder().build(); ListExclusionsResponse expectedResponse = ListExclusionsResponse.newBuilder() @@ -2346,36 +2346,36 @@ void listExclusionsTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListExclusionsRequest actualRequest = ((ListExclusionsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listExclusionsExceptionTest2() throws Exception { + public void listExclusionsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { FolderName parent = FolderName.of("[FOLDER]"); client.listExclusions(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listExclusionsTest3() throws Exception { + public void listExclusionsTest3() throws Exception { LogExclusion responsesElement = LogExclusion.newBuilder().build(); ListExclusionsResponse expectedResponse = ListExclusionsResponse.newBuilder() @@ -2390,36 +2390,36 @@ void listExclusionsTest3() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListExclusionsRequest actualRequest = ((ListExclusionsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listExclusionsExceptionTest3() throws Exception { + public void listExclusionsExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); client.listExclusions(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listExclusionsTest4() throws Exception { + public void listExclusionsTest4() throws Exception { LogExclusion responsesElement = LogExclusion.newBuilder().build(); ListExclusionsResponse expectedResponse = ListExclusionsResponse.newBuilder() @@ -2434,36 +2434,36 @@ void listExclusionsTest4() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListExclusionsRequest actualRequest = ((ListExclusionsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listExclusionsExceptionTest4() throws Exception { + public void listExclusionsExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { ProjectName parent = ProjectName.of("[PROJECT]"); client.listExclusions(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listExclusionsTest5() throws Exception { + public void listExclusionsTest5() throws Exception { LogExclusion responsesElement = LogExclusion.newBuilder().build(); ListExclusionsResponse expectedResponse = ListExclusionsResponse.newBuilder() @@ -2478,36 +2478,36 @@ void listExclusionsTest5() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExclusionsList().get(0), resources.get(0)); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListExclusionsRequest actualRequest = ((ListExclusionsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listExclusionsExceptionTest5() throws Exception { + public void listExclusionsExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listExclusions(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getExclusionTest() throws Exception { + public void getExclusionTest() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2522,35 +2522,35 @@ void getExclusionTest() throws Exception { LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]"); LogExclusion actualResponse = client.getExclusion(name); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetExclusionRequest actualRequest = ((GetExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(name.toString(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getExclusionExceptionTest() throws Exception { + public void getExclusionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]"); client.getExclusion(name); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getExclusionTest2() throws Exception { + public void getExclusionTest2() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2565,35 +2565,35 @@ void getExclusionTest2() throws Exception { String name = "name3373707"; LogExclusion actualResponse = client.getExclusion(name); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetExclusionRequest actualRequest = ((GetExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(name, actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getExclusionExceptionTest2() throws Exception { + public void getExclusionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String name = "name3373707"; client.getExclusion(name); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createExclusionTest() throws Exception { + public void createExclusionTest() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2609,22 +2609,22 @@ void createExclusionTest() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); LogExclusion actualResponse = client.createExclusion(parent, exclusion); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateExclusionRequest actualRequest = ((CreateExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertEquals(exclusion, actualRequest.getExclusion()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(exclusion, actualRequest.getExclusion()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createExclusionExceptionTest() throws Exception { + public void createExclusionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2632,14 +2632,14 @@ void createExclusionExceptionTest() throws Exception { BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]"); LogExclusion exclusion = LogExclusion.newBuilder().build(); client.createExclusion(parent, exclusion); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createExclusionTest2() throws Exception { + public void createExclusionTest2() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2655,22 +2655,22 @@ void createExclusionTest2() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); LogExclusion actualResponse = client.createExclusion(parent, exclusion); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateExclusionRequest actualRequest = ((CreateExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertEquals(exclusion, actualRequest.getExclusion()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(exclusion, actualRequest.getExclusion()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createExclusionExceptionTest2() throws Exception { + public void createExclusionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2678,14 +2678,14 @@ void createExclusionExceptionTest2() throws Exception { FolderName parent = FolderName.of("[FOLDER]"); LogExclusion exclusion = LogExclusion.newBuilder().build(); client.createExclusion(parent, exclusion); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createExclusionTest3() throws Exception { + public void createExclusionTest3() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2701,22 +2701,22 @@ void createExclusionTest3() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); LogExclusion actualResponse = client.createExclusion(parent, exclusion); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateExclusionRequest actualRequest = ((CreateExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertEquals(exclusion, actualRequest.getExclusion()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(exclusion, actualRequest.getExclusion()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createExclusionExceptionTest3() throws Exception { + public void createExclusionExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2724,14 +2724,14 @@ void createExclusionExceptionTest3() throws Exception { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); LogExclusion exclusion = LogExclusion.newBuilder().build(); client.createExclusion(parent, exclusion); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createExclusionTest4() throws Exception { + public void createExclusionTest4() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2747,22 +2747,22 @@ void createExclusionTest4() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); LogExclusion actualResponse = client.createExclusion(parent, exclusion); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateExclusionRequest actualRequest = ((CreateExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertEquals(exclusion, actualRequest.getExclusion()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(exclusion, actualRequest.getExclusion()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createExclusionExceptionTest4() throws Exception { + public void createExclusionExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2770,14 +2770,14 @@ void createExclusionExceptionTest4() throws Exception { ProjectName parent = ProjectName.of("[PROJECT]"); LogExclusion exclusion = LogExclusion.newBuilder().build(); client.createExclusion(parent, exclusion); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createExclusionTest5() throws Exception { + public void createExclusionTest5() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2793,22 +2793,22 @@ void createExclusionTest5() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); LogExclusion actualResponse = client.createExclusion(parent, exclusion); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateExclusionRequest actualRequest = ((CreateExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertEquals(exclusion, actualRequest.getExclusion()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(exclusion, actualRequest.getExclusion()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createExclusionExceptionTest5() throws Exception { + public void createExclusionExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2816,14 +2816,14 @@ void createExclusionExceptionTest5() throws Exception { String parent = "parent-995424086"; LogExclusion exclusion = LogExclusion.newBuilder().build(); client.createExclusion(parent, exclusion); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateExclusionTest() throws Exception { + public void updateExclusionTest() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2840,23 +2840,23 @@ void updateExclusionTest() throws Exception { FieldMask updateMask = FieldMask.newBuilder().build(); LogExclusion actualResponse = client.updateExclusion(name, exclusion, updateMask); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateExclusionRequest actualRequest = ((UpdateExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(name.toString(), actualRequest.getName()); - Assertions.assertEquals(exclusion, actualRequest.getExclusion()); - Assertions.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assertions.assertTrue( + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(exclusion, actualRequest.getExclusion()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateExclusionExceptionTest() throws Exception { + public void updateExclusionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2865,14 +2865,14 @@ void updateExclusionExceptionTest() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateExclusion(name, exclusion, updateMask); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateExclusionTest2() throws Exception { + public void updateExclusionTest2() throws Exception { LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()) @@ -2889,23 +2889,23 @@ void updateExclusionTest2() throws Exception { FieldMask updateMask = FieldMask.newBuilder().build(); LogExclusion actualResponse = client.updateExclusion(name, exclusion, updateMask); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateExclusionRequest actualRequest = ((UpdateExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(name, actualRequest.getName()); - Assertions.assertEquals(exclusion, actualRequest.getExclusion()); - Assertions.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assertions.assertTrue( + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(exclusion, actualRequest.getExclusion()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateExclusionExceptionTest2() throws Exception { + public void updateExclusionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -2914,14 +2914,14 @@ void updateExclusionExceptionTest2() throws Exception { LogExclusion exclusion = LogExclusion.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateExclusion(name, exclusion, updateMask); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void deleteExclusionTest() throws Exception { + public void deleteExclusionTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -2930,32 +2930,32 @@ void deleteExclusionTest() throws Exception { client.deleteExclusion(name); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteExclusionRequest actualRequest = ((DeleteExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(name.toString(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteExclusionExceptionTest() throws Exception { + public void deleteExclusionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]"); client.deleteExclusion(name); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void deleteExclusionTest2() throws Exception { + public void deleteExclusionTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -2964,32 +2964,32 @@ void deleteExclusionTest2() throws Exception { client.deleteExclusion(name); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteExclusionRequest actualRequest = ((DeleteExclusionRequest) actualRequests.get(0)); - Assertions.assertEquals(name, actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteExclusionExceptionTest2() throws Exception { + public void deleteExclusionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String name = "name3373707"; client.deleteExclusion(name); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getCmekSettingsTest() throws Exception { + public void getCmekSettingsTest() throws Exception { CmekSettings expectedResponse = CmekSettings.newBuilder() .setName(CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]").toString()) @@ -3005,21 +3005,21 @@ void getCmekSettingsTest() throws Exception { .build(); CmekSettings actualResponse = client.getCmekSettings(request); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetCmekSettingsRequest actualRequest = ((GetCmekSettingsRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getCmekSettingsExceptionTest() throws Exception { + public void getCmekSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -3029,14 +3029,14 @@ void getCmekSettingsExceptionTest() throws Exception { .setName(CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]").toString()) .build(); client.getCmekSettings(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateCmekSettingsTest() throws Exception { + public void updateCmekSettingsTest() throws Exception { CmekSettings expectedResponse = CmekSettings.newBuilder() .setName(CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]").toString()) @@ -3054,23 +3054,23 @@ void updateCmekSettingsTest() throws Exception { .build(); CmekSettings actualResponse = client.updateCmekSettings(request); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateCmekSettingsRequest actualRequest = ((UpdateCmekSettingsRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertEquals(request.getCmekSettings(), actualRequest.getCmekSettings()); - Assertions.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getCmekSettings(), actualRequest.getCmekSettings()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateCmekSettingsExceptionTest() throws Exception { + public void updateCmekSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -3082,14 +3082,14 @@ void updateCmekSettingsExceptionTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .build(); client.updateCmekSettings(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getSettingsTest() throws Exception { + public void getSettingsTest() throws Exception { Settings expectedResponse = Settings.newBuilder() .setName(SettingsName.ofProjectName("[PROJECT]").toString()) @@ -3103,35 +3103,35 @@ void getSettingsTest() throws Exception { SettingsName name = SettingsName.ofProjectName("[PROJECT]"); Settings actualResponse = client.getSettings(name); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetSettingsRequest actualRequest = ((GetSettingsRequest) actualRequests.get(0)); - Assertions.assertEquals(name.toString(), actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getSettingsExceptionTest() throws Exception { + public void getSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { SettingsName name = SettingsName.ofProjectName("[PROJECT]"); client.getSettings(name); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getSettingsTest2() throws Exception { + public void getSettingsTest2() throws Exception { Settings expectedResponse = Settings.newBuilder() .setName(SettingsName.ofProjectName("[PROJECT]").toString()) @@ -3145,35 +3145,35 @@ void getSettingsTest2() throws Exception { String name = "name3373707"; Settings actualResponse = client.getSettings(name); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetSettingsRequest actualRequest = ((GetSettingsRequest) actualRequests.get(0)); - Assertions.assertEquals(name, actualRequest.getName()); - Assertions.assertTrue( + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getSettingsExceptionTest2() throws Exception { + public void getSettingsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); try { String name = "name3373707"; client.getSettings(name); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateSettingsTest() throws Exception { + public void updateSettingsTest() throws Exception { Settings expectedResponse = Settings.newBuilder() .setName(SettingsName.ofProjectName("[PROJECT]").toString()) @@ -3188,22 +3188,22 @@ void updateSettingsTest() throws Exception { FieldMask updateMask = FieldMask.newBuilder().build(); Settings actualResponse = client.updateSettings(settings, updateMask); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateSettingsRequest actualRequest = ((UpdateSettingsRequest) actualRequests.get(0)); - Assertions.assertEquals(settings, actualRequest.getSettings()); - Assertions.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assertions.assertTrue( + Assert.assertEquals(settings, actualRequest.getSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateSettingsExceptionTest() throws Exception { + public void updateSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -3211,14 +3211,14 @@ void updateSettingsExceptionTest() throws Exception { Settings settings = Settings.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSettings(settings, updateMask); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void copyLogEntriesTest() throws Exception { + public void copyLogEntriesTest() throws Exception { CopyLogEntriesResponse expectedResponse = CopyLogEntriesResponse.newBuilder().setLogEntriesCopiedCount(-2134326978).build(); Operation resultOperation = @@ -3237,23 +3237,23 @@ void copyLogEntriesTest() throws Exception { .build(); CopyLogEntriesResponse actualResponse = client.copyLogEntriesAsync(request).get(); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockConfigServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CopyLogEntriesRequest actualRequest = ((CopyLogEntriesRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getName(), actualRequest.getName()); - Assertions.assertEquals(request.getFilter(), actualRequest.getFilter()); - Assertions.assertEquals(request.getDestination(), actualRequest.getDestination()); - Assertions.assertTrue( + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getDestination(), actualRequest.getDestination()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void copyLogEntriesExceptionTest() throws Exception { + public void copyLogEntriesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockConfigServiceV2.addException(exception); @@ -3265,11 +3265,11 @@ void copyLogEntriesExceptionTest() throws Exception { .setDestination("destination-1429847026") .build(); client.copyLogEntriesAsync(request).get(); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (ExecutionException e) { - Assertions.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assertions.assertEquals( + Assert.assertEquals( StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java index f34a2103f..e994634fb 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java @@ -64,21 +64,21 @@ import java.util.UUID; import java.util.concurrent.ExecutionException; import javax.annotation.Generated; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; +import org.junit.AfterClass; +import org.junit.After; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.Test; @Generated("by gapic-generator-java") -class LoggingClientTest { +public class LoggingClientTest { private static MockLoggingServiceV2 mockLoggingServiceV2; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private LoggingClient client; - @BeforeAll + @BeforeClass public static void startStaticServer() { mockLoggingServiceV2 = new MockLoggingServiceV2(); mockServiceHelper = @@ -87,13 +87,13 @@ public static void startStaticServer() { mockServiceHelper.start(); } - @AfterAll + @AfterClass public static void stopServer() { mockServiceHelper.stop(); } - @BeforeEach - void setUp() throws IOException { + @Before + public void setUp() throws IOException { mockServiceHelper.reset(); channelProvider = mockServiceHelper.createChannelProvider(); LoggingSettings settings = @@ -104,13 +104,13 @@ void setUp() throws IOException { client = LoggingClient.create(settings); } - @AfterEach - void tearDown() throws Exception { + @After + public void tearDown() throws Exception { client.close(); } @Test - void deleteLogTest() throws Exception { + public void deleteLogTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockLoggingServiceV2.addResponse(expectedResponse); @@ -119,32 +119,32 @@ void deleteLogTest() throws Exception { client.deleteLog(logName); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteLogRequest actualRequest = ((DeleteLogRequest) actualRequests.get(0)); - Assertions.assertEquals(logName.toString(), actualRequest.getLogName()); - Assertions.assertTrue( + Assert.assertEquals(logName.toString(), actualRequest.getLogName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteLogExceptionTest() throws Exception { + public void deleteLogExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]"); client.deleteLog(logName); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void deleteLogTest2() throws Exception { + public void deleteLogTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockLoggingServiceV2.addResponse(expectedResponse); @@ -153,32 +153,32 @@ void deleteLogTest2() throws Exception { client.deleteLog(logName); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteLogRequest actualRequest = ((DeleteLogRequest) actualRequests.get(0)); - Assertions.assertEquals(logName, actualRequest.getLogName()); - Assertions.assertTrue( + Assert.assertEquals(logName, actualRequest.getLogName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteLogExceptionTest2() throws Exception { + public void deleteLogExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { String logName = "logName341528559"; client.deleteLog(logName); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void writeLogEntriesTest() throws Exception { + public void writeLogEntriesTest() throws Exception { WriteLogEntriesResponse expectedResponse = WriteLogEntriesResponse.newBuilder().build(); mockLoggingServiceV2.addResponse(expectedResponse); @@ -189,24 +189,24 @@ void writeLogEntriesTest() throws Exception { WriteLogEntriesResponse actualResponse = client.writeLogEntries(logName, resource, labels, entries); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); WriteLogEntriesRequest actualRequest = ((WriteLogEntriesRequest) actualRequests.get(0)); - Assertions.assertEquals(logName.toString(), actualRequest.getLogName()); - Assertions.assertEquals(resource, actualRequest.getResource()); - Assertions.assertEquals(labels, actualRequest.getLabelsMap()); - Assertions.assertEquals(entries, actualRequest.getEntriesList()); - Assertions.assertTrue( + Assert.assertEquals(logName.toString(), actualRequest.getLogName()); + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertEquals(labels, actualRequest.getLabelsMap()); + Assert.assertEquals(entries, actualRequest.getEntriesList()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void writeLogEntriesExceptionTest() throws Exception { + public void writeLogEntriesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); @@ -216,14 +216,14 @@ void writeLogEntriesExceptionTest() throws Exception { Map labels = new HashMap<>(); List entries = new ArrayList<>(); client.writeLogEntries(logName, resource, labels, entries); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void writeLogEntriesTest2() throws Exception { + public void writeLogEntriesTest2() throws Exception { WriteLogEntriesResponse expectedResponse = WriteLogEntriesResponse.newBuilder().build(); mockLoggingServiceV2.addResponse(expectedResponse); @@ -234,24 +234,24 @@ void writeLogEntriesTest2() throws Exception { WriteLogEntriesResponse actualResponse = client.writeLogEntries(logName, resource, labels, entries); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); WriteLogEntriesRequest actualRequest = ((WriteLogEntriesRequest) actualRequests.get(0)); - Assertions.assertEquals(logName, actualRequest.getLogName()); - Assertions.assertEquals(resource, actualRequest.getResource()); - Assertions.assertEquals(labels, actualRequest.getLabelsMap()); - Assertions.assertEquals(entries, actualRequest.getEntriesList()); - Assertions.assertTrue( + Assert.assertEquals(logName, actualRequest.getLogName()); + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertEquals(labels, actualRequest.getLabelsMap()); + Assert.assertEquals(entries, actualRequest.getEntriesList()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void writeLogEntriesExceptionTest2() throws Exception { + public void writeLogEntriesExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); @@ -261,14 +261,14 @@ void writeLogEntriesExceptionTest2() throws Exception { Map labels = new HashMap<>(); List entries = new ArrayList<>(); client.writeLogEntries(logName, resource, labels, entries); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listLogEntriesTest() throws Exception { + public void listLogEntriesTest() throws Exception { LogEntry responsesElement = LogEntry.newBuilder().build(); ListLogEntriesResponse expectedResponse = ListLogEntriesResponse.newBuilder() @@ -286,24 +286,24 @@ void listLogEntriesTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getEntriesList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntriesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListLogEntriesRequest actualRequest = ((ListLogEntriesRequest) actualRequests.get(0)); - Assertions.assertEquals(resourceNames, actualRequest.getResourceNamesList()); - Assertions.assertEquals(filter, actualRequest.getFilter()); - Assertions.assertEquals(orderBy, actualRequest.getOrderBy()); - Assertions.assertTrue( + Assert.assertEquals(resourceNames, actualRequest.getResourceNamesList()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertEquals(orderBy, actualRequest.getOrderBy()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listLogEntriesExceptionTest() throws Exception { + public void listLogEntriesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); @@ -312,14 +312,14 @@ void listLogEntriesExceptionTest() throws Exception { String filter = "filter-1274492040"; String orderBy = "orderBy-1207110587"; client.listLogEntries(resourceNames, filter, orderBy); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listMonitoredResourceDescriptorsTest() throws Exception { + public void listMonitoredResourceDescriptorsTest() throws Exception { MonitoredResourceDescriptor responsesElement = MonitoredResourceDescriptor.newBuilder().build(); ListMonitoredResourceDescriptorsResponse expectedResponse = ListMonitoredResourceDescriptorsResponse.newBuilder() @@ -340,24 +340,24 @@ void listMonitoredResourceDescriptorsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getResourceDescriptorsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourceDescriptorsList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListMonitoredResourceDescriptorsRequest actualRequest = ((ListMonitoredResourceDescriptorsRequest) actualRequests.get(0)); - Assertions.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assertions.assertEquals(request.getPageToken(), actualRequest.getPageToken()); - Assertions.assertTrue( + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listMonitoredResourceDescriptorsExceptionTest() throws Exception { + public void listMonitoredResourceDescriptorsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); @@ -368,14 +368,14 @@ void listMonitoredResourceDescriptorsExceptionTest() throws Exception { .setPageToken("pageToken873572522") .build(); client.listMonitoredResourceDescriptors(request); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listLogsTest() throws Exception { + public void listLogsTest() throws Exception { String responsesElement = "responsesElement-318365110"; ListLogsResponse expectedResponse = ListLogsResponse.newBuilder() @@ -390,36 +390,36 @@ void listLogsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListLogsRequest actualRequest = ((ListLogsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listLogsExceptionTest() throws Exception { + public void listLogsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]"); client.listLogs(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listLogsTest2() throws Exception { + public void listLogsTest2() throws Exception { String responsesElement = "responsesElement-318365110"; ListLogsResponse expectedResponse = ListLogsResponse.newBuilder() @@ -434,36 +434,36 @@ void listLogsTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListLogsRequest actualRequest = ((ListLogsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listLogsExceptionTest2() throws Exception { + public void listLogsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { FolderName parent = FolderName.of("[FOLDER]"); client.listLogs(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listLogsTest3() throws Exception { + public void listLogsTest3() throws Exception { String responsesElement = "responsesElement-318365110"; ListLogsResponse expectedResponse = ListLogsResponse.newBuilder() @@ -478,36 +478,36 @@ void listLogsTest3() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListLogsRequest actualRequest = ((ListLogsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listLogsExceptionTest3() throws Exception { + public void listLogsExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); client.listLogs(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listLogsTest4() throws Exception { + public void listLogsTest4() throws Exception { String responsesElement = "responsesElement-318365110"; ListLogsResponse expectedResponse = ListLogsResponse.newBuilder() @@ -522,36 +522,36 @@ void listLogsTest4() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListLogsRequest actualRequest = ((ListLogsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listLogsExceptionTest4() throws Exception { + public void listLogsExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { ProjectName parent = ProjectName.of("[PROJECT]"); client.listLogs(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listLogsTest5() throws Exception { + public void listLogsTest5() throws Exception { String responsesElement = "responsesElement-318365110"; ListLogsResponse expectedResponse = ListLogsResponse.newBuilder() @@ -566,36 +566,36 @@ void listLogsTest5() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogNamesList().get(0), resources.get(0)); List actualRequests = mockLoggingServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListLogsRequest actualRequest = ((ListLogsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listLogsExceptionTest5() throws Exception { + public void listLogsExceptionTest5() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listLogs(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void tailLogEntriesTest() throws Exception { + public void tailLogEntriesTest() throws Exception { TailLogEntriesResponse expectedResponse = TailLogEntriesResponse.newBuilder() .addAllEntries(new ArrayList()) @@ -620,12 +620,12 @@ void tailLogEntriesTest() throws Exception { requestObserver.onCompleted(); List actualResponses = responseObserver.future().get(); - Assertions.assertEquals(1, actualResponses.size()); - Assertions.assertEquals(expectedResponse, actualResponses.get(0)); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); } @Test - void tailLogEntriesExceptionTest() throws Exception { + public void tailLogEntriesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockLoggingServiceV2.addException(exception); TailLogEntriesRequest request = @@ -646,11 +646,11 @@ void tailLogEntriesExceptionTest() throws Exception { try { List actualResponses = responseObserver.future().get(); - Assertions.fail("No exception thrown"); + Assert.fail("No exception thrown"); } catch (ExecutionException e) { - Assertions.assertTrue(e.getCause() instanceof InvalidArgumentException); + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assertions.assertEquals( + Assert.assertEquals( StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java index 5ff85d39a..79f2e53a2 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java @@ -47,21 +47,21 @@ import java.util.List; import java.util.UUID; import javax.annotation.Generated; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; +import org.junit.AfterClass; +import org.junit.After; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.Test; @Generated("by gapic-generator-java") -class MetricsClientTest { +public class MetricsClientTest { private static MockMetricsServiceV2 mockMetricsServiceV2; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private MetricsClient client; - @BeforeAll + @BeforeClass public static void startStaticServer() { mockMetricsServiceV2 = new MockMetricsServiceV2(); mockServiceHelper = @@ -70,13 +70,13 @@ public static void startStaticServer() { mockServiceHelper.start(); } - @AfterAll + @AfterClass public static void stopServer() { mockServiceHelper.stop(); } - @BeforeEach - void setUp() throws IOException { + @Before + public void setUp() throws IOException { mockServiceHelper.reset(); channelProvider = mockServiceHelper.createChannelProvider(); MetricsSettings settings = @@ -87,13 +87,13 @@ void setUp() throws IOException { client = MetricsClient.create(settings); } - @AfterEach - void tearDown() throws Exception { + @After + public void tearDown() throws Exception { client.close(); } @Test - void listLogMetricsTest() throws Exception { + public void listLogMetricsTest() throws Exception { LogMetric responsesElement = LogMetric.newBuilder().build(); ListLogMetricsResponse expectedResponse = ListLogMetricsResponse.newBuilder() @@ -108,36 +108,36 @@ void listLogMetricsTest() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getMetricsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetricsList().get(0), resources.get(0)); List actualRequests = mockMetricsServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListLogMetricsRequest actualRequest = ((ListLogMetricsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listLogMetricsExceptionTest() throws Exception { + public void listLogMetricsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { ProjectName parent = ProjectName.of("[PROJECT]"); client.listLogMetrics(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void listLogMetricsTest2() throws Exception { + public void listLogMetricsTest2() throws Exception { LogMetric responsesElement = LogMetric.newBuilder().build(); ListLogMetricsResponse expectedResponse = ListLogMetricsResponse.newBuilder() @@ -152,36 +152,36 @@ void listLogMetricsTest2() throws Exception { List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assertions.assertEquals(1, resources.size()); - Assertions.assertEquals(expectedResponse.getMetricsList().get(0), resources.get(0)); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetricsList().get(0), resources.get(0)); List actualRequests = mockMetricsServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); ListLogMetricsRequest actualRequest = ((ListLogMetricsRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void listLogMetricsExceptionTest2() throws Exception { + public void listLogMetricsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { String parent = "parent-995424086"; client.listLogMetrics(parent); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getLogMetricTest() throws Exception { + public void getLogMetricTest() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -201,35 +201,35 @@ void getLogMetricTest() throws Exception { LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]"); LogMetric actualResponse = client.getLogMetric(metricName); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetLogMetricRequest actualRequest = ((GetLogMetricRequest) actualRequests.get(0)); - Assertions.assertEquals(metricName.toString(), actualRequest.getMetricName()); - Assertions.assertTrue( + Assert.assertEquals(metricName.toString(), actualRequest.getMetricName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getLogMetricExceptionTest() throws Exception { + public void getLogMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]"); client.getLogMetric(metricName); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void getLogMetricTest2() throws Exception { + public void getLogMetricTest2() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -249,35 +249,35 @@ void getLogMetricTest2() throws Exception { String metricName = "metricName-610759589"; LogMetric actualResponse = client.getLogMetric(metricName); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); GetLogMetricRequest actualRequest = ((GetLogMetricRequest) actualRequests.get(0)); - Assertions.assertEquals(metricName, actualRequest.getMetricName()); - Assertions.assertTrue( + Assert.assertEquals(metricName, actualRequest.getMetricName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void getLogMetricExceptionTest2() throws Exception { + public void getLogMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { String metricName = "metricName-610759589"; client.getLogMetric(metricName); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createLogMetricTest() throws Exception { + public void createLogMetricTest() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -298,22 +298,22 @@ void createLogMetricTest() throws Exception { LogMetric metric = LogMetric.newBuilder().build(); LogMetric actualResponse = client.createLogMetric(parent, metric); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateLogMetricRequest actualRequest = ((CreateLogMetricRequest) actualRequests.get(0)); - Assertions.assertEquals(parent.toString(), actualRequest.getParent()); - Assertions.assertEquals(metric, actualRequest.getMetric()); - Assertions.assertTrue( + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(metric, actualRequest.getMetric()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createLogMetricExceptionTest() throws Exception { + public void createLogMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); @@ -321,14 +321,14 @@ void createLogMetricExceptionTest() throws Exception { ProjectName parent = ProjectName.of("[PROJECT]"); LogMetric metric = LogMetric.newBuilder().build(); client.createLogMetric(parent, metric); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void createLogMetricTest2() throws Exception { + public void createLogMetricTest2() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -349,22 +349,22 @@ void createLogMetricTest2() throws Exception { LogMetric metric = LogMetric.newBuilder().build(); LogMetric actualResponse = client.createLogMetric(parent, metric); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); CreateLogMetricRequest actualRequest = ((CreateLogMetricRequest) actualRequests.get(0)); - Assertions.assertEquals(parent, actualRequest.getParent()); - Assertions.assertEquals(metric, actualRequest.getMetric()); - Assertions.assertTrue( + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(metric, actualRequest.getMetric()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void createLogMetricExceptionTest2() throws Exception { + public void createLogMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); @@ -372,14 +372,14 @@ void createLogMetricExceptionTest2() throws Exception { String parent = "parent-995424086"; LogMetric metric = LogMetric.newBuilder().build(); client.createLogMetric(parent, metric); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateLogMetricTest() throws Exception { + public void updateLogMetricTest() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -400,22 +400,22 @@ void updateLogMetricTest() throws Exception { LogMetric metric = LogMetric.newBuilder().build(); LogMetric actualResponse = client.updateLogMetric(metricName, metric); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateLogMetricRequest actualRequest = ((UpdateLogMetricRequest) actualRequests.get(0)); - Assertions.assertEquals(metricName.toString(), actualRequest.getMetricName()); - Assertions.assertEquals(metric, actualRequest.getMetric()); - Assertions.assertTrue( + Assert.assertEquals(metricName.toString(), actualRequest.getMetricName()); + Assert.assertEquals(metric, actualRequest.getMetric()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateLogMetricExceptionTest() throws Exception { + public void updateLogMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); @@ -423,14 +423,14 @@ void updateLogMetricExceptionTest() throws Exception { LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]"); LogMetric metric = LogMetric.newBuilder().build(); client.updateLogMetric(metricName, metric); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void updateLogMetricTest2() throws Exception { + public void updateLogMetricTest2() throws Exception { LogMetric expectedResponse = LogMetric.newBuilder() .setName(LogMetricName.of("[PROJECT]", "[METRIC]").toString()) @@ -451,22 +451,22 @@ void updateLogMetricTest2() throws Exception { LogMetric metric = LogMetric.newBuilder().build(); LogMetric actualResponse = client.updateLogMetric(metricName, metric); - Assertions.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockMetricsServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); UpdateLogMetricRequest actualRequest = ((UpdateLogMetricRequest) actualRequests.get(0)); - Assertions.assertEquals(metricName, actualRequest.getMetricName()); - Assertions.assertEquals(metric, actualRequest.getMetric()); - Assertions.assertTrue( + Assert.assertEquals(metricName, actualRequest.getMetricName()); + Assert.assertEquals(metric, actualRequest.getMetric()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void updateLogMetricExceptionTest2() throws Exception { + public void updateLogMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); @@ -474,14 +474,14 @@ void updateLogMetricExceptionTest2() throws Exception { String metricName = "metricName-610759589"; LogMetric metric = LogMetric.newBuilder().build(); client.updateLogMetric(metricName, metric); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void deleteLogMetricTest() throws Exception { + public void deleteLogMetricTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockMetricsServiceV2.addResponse(expectedResponse); @@ -490,32 +490,32 @@ void deleteLogMetricTest() throws Exception { client.deleteLogMetric(metricName); List actualRequests = mockMetricsServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteLogMetricRequest actualRequest = ((DeleteLogMetricRequest) actualRequests.get(0)); - Assertions.assertEquals(metricName.toString(), actualRequest.getMetricName()); - Assertions.assertTrue( + Assert.assertEquals(metricName.toString(), actualRequest.getMetricName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteLogMetricExceptionTest() throws Exception { + public void deleteLogMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]"); client.deleteLogMetric(metricName); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - void deleteLogMetricTest2() throws Exception { + public void deleteLogMetricTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockMetricsServiceV2.addResponse(expectedResponse); @@ -524,25 +524,25 @@ void deleteLogMetricTest2() throws Exception { client.deleteLogMetric(metricName); List actualRequests = mockMetricsServiceV2.getRequests(); - Assertions.assertEquals(1, actualRequests.size()); + Assert.assertEquals(1, actualRequests.size()); DeleteLogMetricRequest actualRequest = ((DeleteLogMetricRequest) actualRequests.get(0)); - Assertions.assertEquals(metricName, actualRequest.getMetricName()); - Assertions.assertTrue( + Assert.assertEquals(metricName, actualRequest.getMetricName()); + Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); } @Test - void deleteLogMetricExceptionTest2() throws Exception { + public void deleteLogMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMetricsServiceV2.addException(exception); try { String metricName = "metricName-610759589"; client.deleteLogMetric(metricName); - Assertions.fail("No exception raised"); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } From e539a41e477caf3b12f566b3ec4545771849e900 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 2 Jan 2026 13:39:18 -0500 Subject: [PATCH 4/8] fix: move test annotations to separate lines The test annotations in the following files were on the same line as the method signature: - samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java - samples/snippets/src/test/java/com/example/logging/LoggingIT.java - samples/snippets/src/test/java/com/example/logging/LogsIT.java - samples/snippets/src/test/java/com/example/logging/SinkIT.java This change moves the annotations to their own lines to improve code readability and adhere to Java coding conventions. --- .../com/example/logging/ITNativeImageLoggingSample.java | 3 ++- .../src/test/java/com/example/logging/LoggingIT.java | 6 ++++-- .../src/test/java/com/example/logging/LogsIT.java | 6 ++++-- .../src/test/java/com/example/logging/SinkIT.java | 9 ++++++--- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java b/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java index 90ee29b39..c98740a0b 100644 --- a/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java +++ b/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java @@ -39,7 +39,8 @@ void tearDown() { System.setOut(originalStdOut); } - @Test void testLogging() throws Exception { + @Test + void testLogging() throws Exception { NativeImageLoggingSample.main(new String[] {}); assertThat(stdOutCaptor.toString("UTF-8")) .contains("Logged: This is a log produced by Native Image."); diff --git a/samples/snippets/src/test/java/com/example/logging/LoggingIT.java b/samples/snippets/src/test/java/com/example/logging/LoggingIT.java index d3121257a..c81536e5e 100644 --- a/samples/snippets/src/test/java/com/example/logging/LoggingIT.java +++ b/samples/snippets/src/test/java/com/example/logging/LoggingIT.java @@ -79,13 +79,15 @@ public static void shutDown() throws Exception { logging.close(); } - @BeforeEach void setUp() { + @BeforeEach + void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); System.setOut(out); } - @AfterEach void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { // Clean up created logs deleteLog(TEST_LOG); System.setOut(null); diff --git a/samples/snippets/src/test/java/com/example/logging/LogsIT.java b/samples/snippets/src/test/java/com/example/logging/LogsIT.java index 355f27315..173f5e49a 100644 --- a/samples/snippets/src/test/java/com/example/logging/LogsIT.java +++ b/samples/snippets/src/test/java/com/example/logging/LogsIT.java @@ -32,13 +32,15 @@ class LogsIT { private ByteArrayOutputStream bout; private PrintStream out; - @BeforeEach void setUp() { + @BeforeEach + void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); System.setOut(out); } - @AfterEach void tearDown() { + @AfterEach + void tearDown() { System.setOut(null); } diff --git a/samples/snippets/src/test/java/com/example/logging/SinkIT.java b/samples/snippets/src/test/java/com/example/logging/SinkIT.java index 1f66ecd16..cdd28ed6a 100644 --- a/samples/snippets/src/test/java/com/example/logging/SinkIT.java +++ b/samples/snippets/src/test/java/com/example/logging/SinkIT.java @@ -39,7 +39,8 @@ class SinkIT { private Logging logging = LoggingOptions.getDefaultInstance().getService(); private static final String SINK_NAME = "test-sink" + UUID.randomUUID().toString(); - @BeforeEach void setUp() { + @BeforeEach + void setUp() { // Create sink logging.create( SinkInfo.newBuilder(SINK_NAME, SinkInfo.Destination.DatasetDestination.of("dataset")) @@ -48,13 +49,15 @@ class SinkIT { .build()); } - @AfterEach void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { // Delete sink logging.deleteSink(SINK_NAME); logging.close(); } - @Test void testGetSinkMetadata() throws Exception { + @Test + void testGetSinkMetadata() throws Exception { Sink sink = logging.getSink(SINK_NAME); assertNotNull(sink); PrintStream standardOut = System.out; From 21f48c6cca16cbae07dbd1148f5674165f972d56 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 2 Jan 2026 13:45:29 -0500 Subject: [PATCH 5/8] fix: revert changes in generated files --- .../cloud/logging/v2/ConfigClientTest.java | 25 +++++++------------ .../cloud/logging/v2/LoggingClientTest.java | 7 +++--- .../cloud/logging/v2/MetricsClientTest.java | 4 +-- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java index b967edd96..e4a8e8770 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java @@ -106,11 +106,11 @@ import java.util.UUID; import java.util.concurrent.ExecutionException; import javax.annotation.Generated; -import org.junit.AfterClass; import org.junit.After; +import org.junit.AfterClass; import org.junit.Assert; -import org.junit.BeforeClass; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; @Generated("by gapic-generator-java") @@ -499,8 +499,7 @@ public void createBucketAsyncExceptionTest() throws Exception { } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals( - StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @@ -574,8 +573,7 @@ public void updateBucketAsyncExceptionTest() throws Exception { } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals( - StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @@ -1951,8 +1949,7 @@ public void createLinkExceptionTest() throws Exception { } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals( - StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @@ -2011,8 +2008,7 @@ public void createLinkExceptionTest2() throws Exception { } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals( - StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @@ -2056,8 +2052,7 @@ public void deleteLinkExceptionTest() throws Exception { } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals( - StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @@ -2099,8 +2094,7 @@ public void deleteLinkExceptionTest2() throws Exception { } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals( - StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @@ -3269,8 +3263,7 @@ public void copyLogEntriesExceptionTest() throws Exception { } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals( - StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } } diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java index e994634fb..5299f9673 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java @@ -64,11 +64,11 @@ import java.util.UUID; import java.util.concurrent.ExecutionException; import javax.annotation.Generated; -import org.junit.AfterClass; import org.junit.After; +import org.junit.AfterClass; import org.junit.Assert; -import org.junit.BeforeClass; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; @Generated("by gapic-generator-java") @@ -650,8 +650,7 @@ public void tailLogEntriesExceptionTest() throws Exception { } catch (ExecutionException e) { Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals( - StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } } diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java index 79f2e53a2..a73df6937 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java @@ -47,11 +47,11 @@ import java.util.List; import java.util.UUID; import javax.annotation.Generated; -import org.junit.AfterClass; import org.junit.After; +import org.junit.AfterClass; import org.junit.Assert; -import org.junit.BeforeClass; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; @Generated("by gapic-generator-java") From 77a0367da2057480308a94979c458504139d2c37 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 2 Jan 2026 13:51:34 -0500 Subject: [PATCH 6/8] feat: Revert samples/ directory to match origin/main --- samples/install-without-bom/pom.xml | 12 ++--- samples/native-image-sample/pom.xml | 18 +++---- .../logging/ITNativeImageLoggingSample.java | 29 ++++-------- samples/pom.xml | 12 ++--- samples/snapshot/pom.xml | 12 ++--- samples/snippets/pom.xml | 12 ++--- .../java/com/example/logging/LoggingIT.java | 47 ++++++++----------- .../test/java/com/example/logging/LogsIT.java | 21 ++++----- .../test/java/com/example/logging/SinkIT.java | 28 +++++------ 9 files changed, 72 insertions(+), 119 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 6c86a5622..d5934cfad 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -33,15 +33,9 @@ - org.junit.jupiter - junit-jupiter-api - 5.10.1 - test - - - org.junit.jupiter - junit-jupiter-engine - 5.10.1 + junit + junit + 4.13.2 test diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index a37ac2e1f..4d358e923 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -43,15 +43,9 @@ - org.junit.jupiter - junit-jupiter-api - 5.10.1 - test - - - org.junit.jupiter - junit-jupiter-engine - 5.10.1 + junit + junit + 4.13.2 test @@ -107,6 +101,12 @@ native + + org.junit.vintage + junit-vintage-engine + 5.10.2 + test + org.graalvm.buildtools junit-platform-native diff --git a/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java b/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java index c98740a0b..6a4ba67ca 100644 --- a/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java +++ b/samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java @@ -18,31 +18,18 @@ import static com.google.common.truth.Truth.assertThat; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; +import com.google.cloud.testing.junit4.StdOutCaptureRule; +import org.junit.Rule; +import org.junit.Test; -class ITNativeImageLoggingSample { +public class ITNativeImageLoggingSample { - private final ByteArrayOutputStream stdOutCaptor = new ByteArrayOutputStream(); - private final PrintStream originalStdOut = System.out; - - @BeforeEach - void setUp() { - System.setOut(new PrintStream(stdOutCaptor)); - } - - @AfterEach - void tearDown() { - System.setOut(originalStdOut); - } + @Rule public StdOutCaptureRule stdOut = new StdOutCaptureRule(); @Test - void testLogging() throws Exception { + public void testLogging() throws Exception { NativeImageLoggingSample.main(new String[] {}); - assertThat(stdOutCaptor.toString("UTF-8")) + assertThat(stdOut.getCapturedOutputAsUtf8String()) .contains("Logged: This is a log produced by Native Image."); } -} \ No newline at end of file +} diff --git a/samples/pom.xml b/samples/pom.xml index 65ee581d7..db6680766 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -57,15 +57,9 @@ - org.junit.jupiter - junit-jupiter-api - 5.10.1 - test - - - org.junit.jupiter - junit-jupiter-engine - 5.10.1 + junit + junit + 4.13.2 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index c08edeaa7..153333434 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -32,15 +32,9 @@ - org.junit.jupiter - junit-jupiter-api - 5.10.1 - test - - - org.junit.jupiter - junit-jupiter-engine - 5.10.1 + junit + junit + 4.13.2 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 079789136..14433b368 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -44,15 +44,9 @@ - org.junit.jupiter - junit-jupiter-api - 5.10.1 - test - - - org.junit.jupiter - junit-jupiter-engine - 5.10.1 + junit + junit + 4.13.2 test diff --git a/samples/snippets/src/test/java/com/example/logging/LoggingIT.java b/samples/snippets/src/test/java/com/example/logging/LoggingIT.java index c81536e5e..d1ebdcd4d 100644 --- a/samples/snippets/src/test/java/com/example/logging/LoggingIT.java +++ b/samples/snippets/src/test/java/com/example/logging/LoggingIT.java @@ -29,20 +29,18 @@ import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.Collections; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.Timeout; -import java.util.concurrent.TimeUnit; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** Tests for quickstart sample. */ - +@RunWith(JUnit4.class) @SuppressWarnings("checkstyle:abbreviationaswordinname") -class LoggingIT { +public class LoggingIT { private static final String TEST_LOG = formatForTest("test-log"); private static final String STRING_PAYLOAD = "Hello, world!"; @@ -69,40 +67,38 @@ private void deleteLog(String logName) throws InterruptedException { } } - @BeforeAll + @BeforeClass public static void startup() { logging = LoggingOptions.getDefaultInstance().getService(); } - @AfterAll + @AfterClass public static void shutDown() throws Exception { logging.close(); } - @BeforeEach - void setUp() { + @Before + public void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); System.setOut(out); } - @AfterEach - void tearDown() throws Exception { + @After + public void tearDown() throws Exception { // Clean up created logs deleteLog(TEST_LOG); System.setOut(null); } - @Test - @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) + @Test(timeout = 60000) public void testQuickstartSample() throws Exception { QuickstartSample.main(TEST_LOG); String got = bout.toString(); assertThat(got).contains(String.format("Logged: %s", STRING_PAYLOAD)); } - @Test - @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) + @Test(timeout = 60000) public void testListLogEntriesSample() throws Exception { // write a log entry LogEntry entry = @@ -127,8 +123,7 @@ public void testListLogEntriesSample() throws Exception { assertThat(bout.toString().contains(STRING_PAYLOAD2)).isTrue(); } - @Test - @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) + @Test(timeout = 60000) public void testWriteLogHttpRequestSample() throws Exception { HttpRequest request = HttpRequest.newBuilder() @@ -155,16 +150,14 @@ public void testWriteLogHttpRequestSample() throws Exception { assertThat(bout.toString().contains(request.toString())).isTrue(); } - @Test - @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) + @Test(timeout = 60000) public void testWriteLogEntrySample() throws Exception { WriteLogEntry.main(new String[] {TEST_LOG}); String got = bout.toString(); assertThat(got).contains(String.format("Wrote to %s", TEST_LOG)); } - @Test - @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) + @Test(timeout = 60000) public void testTailLogEntriesSample() throws Exception { Runnable task = () -> { diff --git a/samples/snippets/src/test/java/com/example/logging/LogsIT.java b/samples/snippets/src/test/java/com/example/logging/LogsIT.java index 173f5e49a..181ba2f3c 100644 --- a/samples/snippets/src/test/java/com/example/logging/LogsIT.java +++ b/samples/snippets/src/test/java/com/example/logging/LogsIT.java @@ -20,32 +20,29 @@ import java.io.ByteArrayOutputStream; import java.io.PrintStream; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.Timeout; -import java.util.concurrent.TimeUnit; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; -class LogsIT { +public class LogsIT { private static final String GOOGLEAPIS_AUDIT_LOGNAME = "cloudaudit.googleapis.com%2Factivity"; private ByteArrayOutputStream bout; private PrintStream out; - @BeforeEach - void setUp() { + @Before + public void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); System.setOut(out); } - @AfterEach - void tearDown() { + @After + public void tearDown() { System.setOut(null); } - @Test - @Timeout(value = 60000, unit = TimeUnit.MILLISECONDS) + @Test(timeout = 60000) public void testListLogNamesSample() throws Exception { ListLogs.main(); // Check for mocked STDOUT having data diff --git a/samples/snippets/src/test/java/com/example/logging/SinkIT.java b/samples/snippets/src/test/java/com/example/logging/SinkIT.java index cdd28ed6a..bcc4de6e1 100644 --- a/samples/snippets/src/test/java/com/example/logging/SinkIT.java +++ b/samples/snippets/src/test/java/com/example/logging/SinkIT.java @@ -16,8 +16,8 @@ package com.example.logging; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import com.google.cloud.logging.Logging; import com.google.cloud.logging.LoggingOptions; @@ -26,21 +26,21 @@ import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.UUID; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** Tests for sink sample. */ - -class SinkIT { +@RunWith(JUnit4.class) +public class SinkIT { private Logging logging = LoggingOptions.getDefaultInstance().getService(); private static final String SINK_NAME = "test-sink" + UUID.randomUUID().toString(); - @BeforeEach - void setUp() { + @Before + public void setUp() { // Create sink logging.create( SinkInfo.newBuilder(SINK_NAME, SinkInfo.Destination.DatasetDestination.of("dataset")) @@ -49,15 +49,15 @@ void setUp() { .build()); } - @AfterEach - void tearDown() throws Exception { + @After + public void tearDown() throws Exception { // Delete sink logging.deleteSink(SINK_NAME); logging.close(); } @Test - void testGetSinkMetadata() throws Exception { + public void testGetSinkMetadata() throws Exception { Sink sink = logging.getSink(SINK_NAME); assertNotNull(sink); PrintStream standardOut = System.out; From 00981311999539b203135f031c2a6966600e98aa Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 2 Jan 2026 14:03:05 -0500 Subject: [PATCH 7/8] chore: Add junit ignore deps for dependency plugin --- google-cloud-logging/pom.xml | 9 +++++++++ .../cloud/logging/InstrumentationTest.java | 2 +- pom.xml | 17 +++++++++++------ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/google-cloud-logging/pom.xml b/google-cloud-logging/pom.xml index 78376d527..dc3e53e39 100644 --- a/google-cloud-logging/pom.xml +++ b/google-cloud-logging/pom.xml @@ -108,6 +108,13 @@ + + + + junit + junit + test + org.junit.jupiter junit-jupiter-api @@ -123,6 +130,8 @@ junit-jupiter-params test + + org.junit.vintage junit-vintage-engine diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java index 075e23d0d..bfcb6139f 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java @@ -149,4 +149,4 @@ private static void verifyEntries( assertEquals(0, names.size()); assertEquals(0, versions.size()); } -} \ No newline at end of file +} diff --git a/pom.xml b/pom.xml index fbc9a50e8..401204087 100644 --- a/pom.xml +++ b/pom.xml @@ -102,11 +102,10 @@ - org.junit - junit-bom - 5.10.1 - pom - import + junit + junit + 4.13.2 + test org.easymock @@ -195,7 +194,13 @@ org.apache.maven.plugins maven-dependency-plugin - org.objenesis:objenesis + + org.objenesis:objenesis + + org.junit.jupiter:junit-jupiter-engine + + org.junit.vintage:junit-vintage-engine + From 88df3931fcda7177e0c3b797bbc6a8977c7227b0 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 2 Jan 2026 19:06:57 +0000 Subject: [PATCH 8/8] chore: generate libraries at Fri Jan 2 19:05:03 UTC 2026 --- .../src/main/java/com/google/cloud/logging/v2/ConfigClient.java | 2 +- .../main/java/com/google/cloud/logging/v2/ConfigSettings.java | 2 +- .../main/java/com/google/cloud/logging/v2/LoggingClient.java | 2 +- .../main/java/com/google/cloud/logging/v2/LoggingSettings.java | 2 +- .../main/java/com/google/cloud/logging/v2/MetricsClient.java | 2 +- .../main/java/com/google/cloud/logging/v2/MetricsSettings.java | 2 +- .../src/main/java/com/google/cloud/logging/v2/package-info.java | 2 +- .../com/google/cloud/logging/v2/stub/ConfigServiceV2Stub.java | 2 +- .../cloud/logging/v2/stub/ConfigServiceV2StubSettings.java | 2 +- .../logging/v2/stub/GrpcConfigServiceV2CallableFactory.java | 2 +- .../google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java | 2 +- .../logging/v2/stub/GrpcLoggingServiceV2CallableFactory.java | 2 +- .../google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java | 2 +- .../logging/v2/stub/GrpcMetricsServiceV2CallableFactory.java | 2 +- .../google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java | 2 +- .../com/google/cloud/logging/v2/stub/LoggingServiceV2Stub.java | 2 +- .../cloud/logging/v2/stub/LoggingServiceV2StubSettings.java | 2 +- .../com/google/cloud/logging/v2/stub/MetricsServiceV2Stub.java | 2 +- .../cloud/logging/v2/stub/MetricsServiceV2StubSettings.java | 2 +- .../test/java/com/google/cloud/logging/v2/ConfigClientTest.java | 2 +- .../java/com/google/cloud/logging/v2/LoggingClientTest.java | 2 +- .../java/com/google/cloud/logging/v2/MetricsClientTest.java | 2 +- .../java/com/google/cloud/logging/v2/MockConfigServiceV2.java | 2 +- .../com/google/cloud/logging/v2/MockConfigServiceV2Impl.java | 2 +- .../java/com/google/cloud/logging/v2/MockLoggingServiceV2.java | 2 +- .../com/google/cloud/logging/v2/MockLoggingServiceV2Impl.java | 2 +- .../java/com/google/cloud/logging/v2/MockMetricsServiceV2.java | 2 +- .../com/google/cloud/logging/v2/MockMetricsServiceV2Impl.java | 2 +- .../main/java/com/google/logging/v2/ConfigServiceV2Grpc.java | 2 +- .../main/java/com/google/logging/v2/LoggingServiceV2Grpc.java | 2 +- .../main/java/com/google/logging/v2/MetricsServiceV2Grpc.java | 2 +- .../src/main/java/com/google/logging/v2/BigQueryDataset.java | 2 +- .../java/com/google/logging/v2/BigQueryDatasetOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/BigQueryOptions.java | 2 +- .../java/com/google/logging/v2/BigQueryOptionsOrBuilder.java | 2 +- .../java/com/google/logging/v2/BillingAccountLocationName.java | 2 +- .../src/main/java/com/google/logging/v2/BillingAccountName.java | 2 +- .../src/main/java/com/google/logging/v2/BucketMetadata.java | 2 +- .../java/com/google/logging/v2/BucketMetadataOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/CmekSettings.java | 2 +- .../src/main/java/com/google/logging/v2/CmekSettingsName.java | 2 +- .../main/java/com/google/logging/v2/CmekSettingsOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/CopyLogEntriesMetadata.java | 2 +- .../com/google/logging/v2/CopyLogEntriesMetadataOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/CopyLogEntriesRequest.java | 2 +- .../com/google/logging/v2/CopyLogEntriesRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/CopyLogEntriesResponse.java | 2 +- .../com/google/logging/v2/CopyLogEntriesResponseOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/CreateBucketRequest.java | 2 +- .../com/google/logging/v2/CreateBucketRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/CreateExclusionRequest.java | 2 +- .../com/google/logging/v2/CreateExclusionRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/CreateLinkRequest.java | 2 +- .../java/com/google/logging/v2/CreateLinkRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/CreateLogMetricRequest.java | 2 +- .../com/google/logging/v2/CreateLogMetricRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/CreateSinkRequest.java | 2 +- .../java/com/google/logging/v2/CreateSinkRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/CreateViewRequest.java | 2 +- .../java/com/google/logging/v2/CreateViewRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/DeleteBucketRequest.java | 2 +- .../com/google/logging/v2/DeleteBucketRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/DeleteExclusionRequest.java | 2 +- .../com/google/logging/v2/DeleteExclusionRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/DeleteLinkRequest.java | 2 +- .../java/com/google/logging/v2/DeleteLinkRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/DeleteLogMetricRequest.java | 2 +- .../com/google/logging/v2/DeleteLogMetricRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/DeleteLogRequest.java | 2 +- .../java/com/google/logging/v2/DeleteLogRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/DeleteSinkRequest.java | 2 +- .../java/com/google/logging/v2/DeleteSinkRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/DeleteViewRequest.java | 2 +- .../java/com/google/logging/v2/DeleteViewRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/FolderLocationName.java | 2 +- .../src/main/java/com/google/logging/v2/FolderName.java | 2 +- .../src/main/java/com/google/logging/v2/GetBucketRequest.java | 2 +- .../java/com/google/logging/v2/GetBucketRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/GetCmekSettingsRequest.java | 2 +- .../com/google/logging/v2/GetCmekSettingsRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/GetExclusionRequest.java | 2 +- .../com/google/logging/v2/GetExclusionRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/GetLinkRequest.java | 2 +- .../java/com/google/logging/v2/GetLinkRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/GetLogMetricRequest.java | 2 +- .../com/google/logging/v2/GetLogMetricRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/GetSettingsRequest.java | 2 +- .../java/com/google/logging/v2/GetSettingsRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/GetSinkRequest.java | 2 +- .../java/com/google/logging/v2/GetSinkRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/GetViewRequest.java | 2 +- .../java/com/google/logging/v2/GetViewRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/IndexConfig.java | 2 +- .../main/java/com/google/logging/v2/IndexConfigOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/IndexType.java | 2 +- .../src/main/java/com/google/logging/v2/LifecycleState.java | 2 +- .../src/main/java/com/google/logging/v2/Link.java | 2 +- .../src/main/java/com/google/logging/v2/LinkMetadata.java | 2 +- .../main/java/com/google/logging/v2/LinkMetadataOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LinkName.java | 2 +- .../src/main/java/com/google/logging/v2/LinkOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/ListBucketsRequest.java | 2 +- .../java/com/google/logging/v2/ListBucketsRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/ListBucketsResponse.java | 2 +- .../com/google/logging/v2/ListBucketsResponseOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/ListExclusionsRequest.java | 2 +- .../com/google/logging/v2/ListExclusionsRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/ListExclusionsResponse.java | 2 +- .../com/google/logging/v2/ListExclusionsResponseOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/ListLinksRequest.java | 2 +- .../java/com/google/logging/v2/ListLinksRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/ListLinksResponse.java | 2 +- .../java/com/google/logging/v2/ListLinksResponseOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/ListLogEntriesRequest.java | 2 +- .../com/google/logging/v2/ListLogEntriesRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/ListLogEntriesResponse.java | 2 +- .../com/google/logging/v2/ListLogEntriesResponseOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/ListLogMetricsRequest.java | 2 +- .../com/google/logging/v2/ListLogMetricsRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/ListLogMetricsResponse.java | 2 +- .../com/google/logging/v2/ListLogMetricsResponseOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/ListLogsRequest.java | 2 +- .../java/com/google/logging/v2/ListLogsRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/ListLogsResponse.java | 2 +- .../java/com/google/logging/v2/ListLogsResponseOrBuilder.java | 2 +- .../logging/v2/ListMonitoredResourceDescriptorsRequest.java | 2 +- .../v2/ListMonitoredResourceDescriptorsRequestOrBuilder.java | 2 +- .../logging/v2/ListMonitoredResourceDescriptorsResponse.java | 2 +- .../v2/ListMonitoredResourceDescriptorsResponseOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/ListSinksRequest.java | 2 +- .../java/com/google/logging/v2/ListSinksRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/ListSinksResponse.java | 2 +- .../java/com/google/logging/v2/ListSinksResponseOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/ListViewsRequest.java | 2 +- .../java/com/google/logging/v2/ListViewsRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/ListViewsResponse.java | 2 +- .../java/com/google/logging/v2/ListViewsResponseOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LocationMetadata.java | 2 +- .../java/com/google/logging/v2/LocationMetadataOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LocationName.java | 2 +- .../src/main/java/com/google/logging/v2/LogBucket.java | 2 +- .../src/main/java/com/google/logging/v2/LogBucketName.java | 2 +- .../src/main/java/com/google/logging/v2/LogBucketOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LogEntry.java | 2 +- .../src/main/java/com/google/logging/v2/LogEntryOperation.java | 2 +- .../java/com/google/logging/v2/LogEntryOperationOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LogEntryOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LogEntryProto.java | 2 +- .../main/java/com/google/logging/v2/LogEntrySourceLocation.java | 2 +- .../com/google/logging/v2/LogEntrySourceLocationOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LogExclusion.java | 2 +- .../src/main/java/com/google/logging/v2/LogExclusionName.java | 2 +- .../main/java/com/google/logging/v2/LogExclusionOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LogMetric.java | 2 +- .../src/main/java/com/google/logging/v2/LogMetricName.java | 2 +- .../src/main/java/com/google/logging/v2/LogMetricOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LogName.java | 2 +- .../src/main/java/com/google/logging/v2/LogSink.java | 2 +- .../src/main/java/com/google/logging/v2/LogSinkName.java | 2 +- .../src/main/java/com/google/logging/v2/LogSinkOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LogSplit.java | 2 +- .../src/main/java/com/google/logging/v2/LogSplitOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LogView.java | 2 +- .../src/main/java/com/google/logging/v2/LogViewName.java | 2 +- .../src/main/java/com/google/logging/v2/LogViewOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/LoggingConfigProto.java | 2 +- .../main/java/com/google/logging/v2/LoggingMetricsProto.java | 2 +- .../src/main/java/com/google/logging/v2/LoggingProto.java | 2 +- .../src/main/java/com/google/logging/v2/OperationState.java | 2 +- .../java/com/google/logging/v2/OrganizationLocationName.java | 2 +- .../src/main/java/com/google/logging/v2/OrganizationName.java | 2 +- .../src/main/java/com/google/logging/v2/ProjectName.java | 2 +- .../src/main/java/com/google/logging/v2/Settings.java | 2 +- .../src/main/java/com/google/logging/v2/SettingsName.java | 2 +- .../src/main/java/com/google/logging/v2/SettingsOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/TailLogEntriesRequest.java | 2 +- .../com/google/logging/v2/TailLogEntriesRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/TailLogEntriesResponse.java | 2 +- .../com/google/logging/v2/TailLogEntriesResponseOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/UndeleteBucketRequest.java | 2 +- .../com/google/logging/v2/UndeleteBucketRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/UpdateBucketRequest.java | 2 +- .../com/google/logging/v2/UpdateBucketRequestOrBuilder.java | 2 +- .../java/com/google/logging/v2/UpdateCmekSettingsRequest.java | 2 +- .../google/logging/v2/UpdateCmekSettingsRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/UpdateExclusionRequest.java | 2 +- .../com/google/logging/v2/UpdateExclusionRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/UpdateLogMetricRequest.java | 2 +- .../com/google/logging/v2/UpdateLogMetricRequestOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/UpdateSettingsRequest.java | 2 +- .../com/google/logging/v2/UpdateSettingsRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/UpdateSinkRequest.java | 2 +- .../java/com/google/logging/v2/UpdateSinkRequestOrBuilder.java | 2 +- .../src/main/java/com/google/logging/v2/UpdateViewRequest.java | 2 +- .../java/com/google/logging/v2/UpdateViewRequestOrBuilder.java | 2 +- .../com/google/logging/v2/WriteLogEntriesPartialErrors.java | 2 +- .../logging/v2/WriteLogEntriesPartialErrorsOrBuilder.java | 2 +- .../main/java/com/google/logging/v2/WriteLogEntriesRequest.java | 2 +- .../com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java | 2 +- .../java/com/google/logging/v2/WriteLogEntriesResponse.java | 2 +- .../com/google/logging/v2/WriteLogEntriesResponseOrBuilder.java | 2 +- 201 files changed, 201 insertions(+), 201 deletions(-) diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java index 6216cbacc..d25b88491 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigSettings.java index aeed6d1ca..765fa49c8 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigSettings.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java index d4e84c3b3..a8a708078 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingSettings.java index 688bc3269..18321edf7 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingSettings.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java index cbeed2501..8ee3f6207 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsSettings.java index d75380296..b29efecf6 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsSettings.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/package-info.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/package-info.java index 562971562..029536712 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/package-info.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2Stub.java index e5b734ebb..ba40b213b 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2Stub.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2Stub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java index b3ccd40a1..555203c56 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2CallableFactory.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2CallableFactory.java index ee8ab9705..e37c3746b 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2CallableFactory.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2CallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java index f5cd1a54a..4b810bd55 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2CallableFactory.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2CallableFactory.java index b12cd704d..2ea721e81 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2CallableFactory.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2CallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java index c227a7d1b..ce6c8efc1 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2CallableFactory.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2CallableFactory.java index 593ca85d9..d64bb1b3f 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2CallableFactory.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2CallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java index 35d5d1830..f6b4e3ab6 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2Stub.java index 63c959ef2..5e2830d0e 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2Stub.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2Stub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java index 2320f900e..70f47cbd3 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2Stub.java index 14e6fdd3d..f546d2c26 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2Stub.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2Stub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java index b4786a31a..7f08a8e1d 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java index e4a8e8770..44edf6ece 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java index 5299f9673..da2bff393 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java index a73df6937..6d388979e 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2.java index 4307b3818..c7ebe0ffe 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2Impl.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2Impl.java index 2b795e6c4..9539675fe 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2Impl.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockLoggingServiceV2.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockLoggingServiceV2.java index 3a0d1f388..566b2df32 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockLoggingServiceV2.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockLoggingServiceV2.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockLoggingServiceV2Impl.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockLoggingServiceV2Impl.java index 8e2ff8754..22a8770f2 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockLoggingServiceV2Impl.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockLoggingServiceV2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockMetricsServiceV2.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockMetricsServiceV2.java index d4bb1d5af..75cb84fb9 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockMetricsServiceV2.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockMetricsServiceV2.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockMetricsServiceV2Impl.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockMetricsServiceV2Impl.java index 597b93be7..2e322e1da 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockMetricsServiceV2Impl.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockMetricsServiceV2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ConfigServiceV2Grpc.java b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ConfigServiceV2Grpc.java index e306944ed..7f26c3bc0 100644 --- a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ConfigServiceV2Grpc.java +++ b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ConfigServiceV2Grpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java index e654a1b54..41e5b84e1 100644 --- a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java +++ b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricsServiceV2Grpc.java b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricsServiceV2Grpc.java index ecc22d024..0c36ddf14 100644 --- a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricsServiceV2Grpc.java +++ b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricsServiceV2Grpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryDataset.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryDataset.java index 585489e6f..b75c067f3 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryDataset.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryDataset.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryDatasetOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryDatasetOrBuilder.java index 74e807c5e..db4142a19 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryDatasetOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryDatasetOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptions.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptions.java index 58b38a994..5e7fdc646 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptions.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptionsOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptionsOrBuilder.java index e9cd03d9e..ea413c2bf 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptionsOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptionsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountLocationName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountLocationName.java index 4ced3ee80..1a5aa5c8d 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountLocationName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountLocationName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountName.java index 39901d951..681a8031f 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BucketMetadata.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BucketMetadata.java index 4120fa1c9..f3e0fb10e 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BucketMetadata.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BucketMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BucketMetadataOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BucketMetadataOrBuilder.java index 5141f284c..c2b44e213 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BucketMetadataOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BucketMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettings.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettings.java index 562200a44..970b30393 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettings.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsName.java index b6faec28b..dc03c46f5 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsOrBuilder.java index c3f9d00c2..77b2e3621 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesMetadata.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesMetadata.java index 31bd88766..69be1ea83 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesMetadata.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesMetadataOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesMetadataOrBuilder.java index a7f6eca40..bc0540ae4 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesMetadataOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesRequest.java index becd41ae8..81a3a81c4 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesRequestOrBuilder.java index 85b163ba2..0c9834d67 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesResponse.java index a4b8ec3b7..add32caa2 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesResponseOrBuilder.java index 34c265661..55b777e0f 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CopyLogEntriesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequest.java index 53c6c1bfc..ce76eea1b 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequestOrBuilder.java index 09a07f8af..b6c9e3a8b 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java index b5cfe176c..fd3e970a1 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequestOrBuilder.java index 5eb027106..d7cfa0e00 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLinkRequest.java index 54a71afd5..cc136d58b 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLinkRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLinkRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLinkRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLinkRequestOrBuilder.java index d5d33ea52..7677682f6 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLinkRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLinkRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java index 74c7bcbae..15d558d12 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequestOrBuilder.java index 9ced49128..d84b24a99 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java index 4903408e0..42cf9b223 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequestOrBuilder.java index 0b2040e31..2fb017a65 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequest.java index db5c577f0..0fa94205d 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequestOrBuilder.java index 29e256c86..73af191be 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequest.java index a4de92e84..49d8a7a88 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequestOrBuilder.java index 333833e1c..610defcf2 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java index 5b9241fda..9a14ebeae 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequestOrBuilder.java index 085aec573..e85c5c182 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLinkRequest.java index 24bf2d235..ded488e45 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLinkRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLinkRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLinkRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLinkRequestOrBuilder.java index a02c71920..bc20c523f 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLinkRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLinkRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java index a41c0add5..6fe475b2e 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequestOrBuilder.java index b32fe1a65..c2a161cb9 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java index 88218d316..619fc73b9 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequestOrBuilder.java index 4bb411c68..cc81367fe 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java index 617b83325..308961010 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequestOrBuilder.java index b31bcf1e8..593e6c4ce 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequest.java index f87c02b24..d3433d671 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequestOrBuilder.java index f69f397ca..707d9ab82 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLocationName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLocationName.java index 74e72ff9a..4860a1eb4 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLocationName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLocationName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderName.java index 06b243aa0..2cb041189 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequest.java index 24d0a62e2..4e77cd0f9 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequestOrBuilder.java index 37af71550..f7c2a0b61 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequest.java index 07ad21cb1..8b2bc6bf6 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequestOrBuilder.java index fe5216219..03a5ce799 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java index 1438cf90d..3630dea59 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequestOrBuilder.java index 9f2c1ee27..b6cd1b846 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLinkRequest.java index e9a590bb2..a3b162d67 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLinkRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLinkRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLinkRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLinkRequestOrBuilder.java index 3a9cfe915..50098f0e0 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLinkRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLinkRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java index 2f30ffde9..37793aefd 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequestOrBuilder.java index a1f5f4000..7e2223c52 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSettingsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSettingsRequest.java index b7b2edbbf..fe127a4d7 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSettingsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSettingsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSettingsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSettingsRequestOrBuilder.java index e3d9bd7c1..b072dd1d2 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSettingsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSettingsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java index 2e4f967bc..30ddc0ab0 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequestOrBuilder.java index 71ba33daa..d0e67787f 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequest.java index d148f2d7f..cf2482642 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequestOrBuilder.java index d85336637..10f88d912 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexConfig.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexConfig.java index 1a6a51fef..69aae7412 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexConfig.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexConfigOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexConfigOrBuilder.java index 008894ccb..3bda9d50c 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexConfigOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexType.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexType.java index 8e8e9ba97..c7fcd6cd0 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexType.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/IndexType.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LifecycleState.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LifecycleState.java index 0d431e7f2..cbe9279ba 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LifecycleState.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LifecycleState.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/Link.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/Link.java index bef90bb06..6676d0939 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/Link.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/Link.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkMetadata.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkMetadata.java index 3e594a8c8..563a3f344 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkMetadata.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkMetadataOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkMetadataOrBuilder.java index 1cd31b9f1..beab51d25 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkMetadataOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkName.java index 71b077484..cbf131ca4 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkOrBuilder.java index c818e0cc5..4d1253cd5 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LinkOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequest.java index 9baa7dd87..def8cff68 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequestOrBuilder.java index 1353d494f..6038c8c77 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponse.java index 0ce5a9879..9b481c592 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponseOrBuilder.java index 1d7ebd525..150446299 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java index 4eab300ad..536f0d0fc 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequestOrBuilder.java index fabecce1e..fbde84690 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java index f68fd08cc..0a03a6b91 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponseOrBuilder.java index 45628897b..ded1d52fd 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksRequest.java index 52fcaac17..f7e9daf2d 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksRequestOrBuilder.java index 79c4c1071..eb3ce0d03 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksResponse.java index 9776e8303..dce0494c1 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksResponseOrBuilder.java index 19945b209..7b3ae5037 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLinksResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java index 199fba2e4..205eedff6 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java index 7abbf51e7..1da4298e4 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java index bccb09fa8..6ddcdab20 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponseOrBuilder.java index fb115c192..f5473de1b 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java index 8e72f973e..cb81bd41a 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequestOrBuilder.java index f83ae6232..ad346218f 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java index bbaee6bee..7f042b138 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponseOrBuilder.java index bb5b50654..316fcceea 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java index 4d899e86e..2e8c2c60a 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequestOrBuilder.java index 8107fbb6f..7588a7b3f 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java index 0ed83ee85..a72685c93 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponseOrBuilder.java index 8ed3606e5..0ba4fe93a 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java index 36cc64514..14de7ddc6 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequestOrBuilder.java index f730f7ef6..bf74f75cd 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java index 8b202f9a2..e7bbae00b 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponseOrBuilder.java index a27d28480..e6b2201e4 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java index 1ec74430a..0c249b9ed 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequestOrBuilder.java index e319319df..0c45621b0 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java index b6fc17af1..ff99a7656 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponseOrBuilder.java index c2a8c4a1f..67ab169e6 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequest.java index 6131239b8..51bc472ec 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequestOrBuilder.java index 94302e697..5a41b97a9 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponse.java index d0efca4cb..f88d9dcdd 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponseOrBuilder.java index 4050e8aa1..e92cc9bff 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationMetadata.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationMetadata.java index 299051cba..173617fe0 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationMetadata.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationMetadataOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationMetadataOrBuilder.java index e3ada972e..647e059da 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationMetadataOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationName.java index 0611cebaf..6f29f3fd7 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucket.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucket.java index a223ab69f..9a1edfda4 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucket.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucket.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketName.java index c915636c2..640a055a1 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketOrBuilder.java index b76c22af2..6928c0711 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java index f16da0da7..3fc60942b 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java index 824affa8e..ccbbed3fc 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperationOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperationOrBuilder.java index a36a20a51..c400824ac 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperationOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperationOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java index f12143fcc..81dc37b61 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java index 6bd3e07fb..d163759db 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java index 164f9c021..b24b0aad4 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocationOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocationOrBuilder.java index f146e30c3..a57f1f1b6 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocationOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocationOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java index 883ba15f4..22b5b95f3 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionName.java index 2e11790ee..89de682b0 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java index 6923b361c..0cdc320a1 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java index d006a5999..4292ee778 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricName.java index 7fe6a52fc..019696eea 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java index 2548fabac..f995c2e6b 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogName.java index 4dbeb75d0..d98759efc 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java index 5c7d23dfe..beac5d5a3 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkName.java index cf0e232d5..7e6959ac6 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java index f3764c37a..e9cd2c7f9 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSplit.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSplit.java index 1a695deca..c95f94fcd 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSplit.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSplit.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSplitOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSplitOrBuilder.java index a0fc95789..5e20c6839 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSplitOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSplitOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogView.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogView.java index 7248d09ca..4605e3d9c 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogView.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogView.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewName.java index 4ff5babaf..ddf118ff1 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewOrBuilder.java index 622a4562c..9d033b09c 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java index 24674ece4..2857b4051 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java index 3c4f72e3d..8fcc26dfa 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java index 61cb2d7db..9d1b286df 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OperationState.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OperationState.java index 247dc095c..6e09d616d 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OperationState.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OperationState.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLocationName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLocationName.java index 926ce4f31..a747d117e 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLocationName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLocationName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationName.java index 410cabf02..44d1cb28d 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectName.java index 4b576f153..aa708f472 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/Settings.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/Settings.java index 242320e09..8055d7416 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/Settings.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/Settings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SettingsName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SettingsName.java index ef6e1807b..388e29d87 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SettingsName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SettingsName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SettingsOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SettingsOrBuilder.java index 2cc3f3bac..8e5deb4dd 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SettingsOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SettingsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesRequest.java index c772b8f69..972de71c8 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesRequestOrBuilder.java index 102880e17..620d8d385 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesResponse.java index 6e2609fc1..9bf39bd93 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesResponseOrBuilder.java index a411989b4..454503a5d 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/TailLogEntriesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequest.java index dc8f45881..aa660f806 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequestOrBuilder.java index e7177d777..b4cb111fc 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequest.java index d9614314b..3a23bca8b 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequestOrBuilder.java index b05202d9d..5665e7927 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequest.java index dc4d73991..045d05791 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequestOrBuilder.java index 9ad851e2b..2fe17f9a0 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java index 70787bae2..18782742d 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequestOrBuilder.java index bd6df6337..1186d4bad 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java index 6c57aeca5..79830d1fc 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequestOrBuilder.java index 7c931dc7e..0f31c10a7 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSettingsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSettingsRequest.java index 0cb0d4df2..3691f5742 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSettingsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSettingsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSettingsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSettingsRequestOrBuilder.java index 449a11d8c..ec696b0c5 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSettingsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSettingsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java index 65d5a15a4..99ec38298 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequestOrBuilder.java index ce4d62abd..8321105d4 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequest.java index 4a9e62461..f55f5a170 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequestOrBuilder.java index ea1a3a0ee..4a2164cbc 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java index f12a54770..5179c1e07 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrorsOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrorsOrBuilder.java index 3dfe010a5..22d355a08 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrorsOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrorsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java index 2702ea068..cd0a35e1e 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java index 6750e665f..705b39cb5 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java index 25ff97e41..8f5f61f37 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponseOrBuilder.java index 1014a7596..83b0681a8 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponseOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.