diff --git a/src/test/java/io/cryostat/net/web/http/api/v1/TargetRecordingOptionsPatchHandlerTest.java b/src/test/java/io/cryostat/net/web/http/api/v1/TargetRecordingOptionsPatchHandlerTest.java index 80a0a36704..801ab98b26 100644 --- a/src/test/java/io/cryostat/net/web/http/api/v1/TargetRecordingOptionsPatchHandlerTest.java +++ b/src/test/java/io/cryostat/net/web/http/api/v1/TargetRecordingOptionsPatchHandlerTest.java @@ -115,16 +115,16 @@ void shouldHaveExpectedRequiredPermissions() { @Test void shouldSetRecordingOptions() throws Exception { - Map defaultValues = + Map originalValues = Map.of("toDisk", "true", "maxAge", "50", "maxSize", "32"); Mockito.when(recordingOptionsBuilderFactory.create(Mockito.any())).thenReturn(builder); Mockito.when(builder.build()).thenReturn(recordingOptions); - Mockito.when(recordingOptions.get("toDisk")).thenReturn(defaultValues.get("toDisk")); - Mockito.when(recordingOptions.get("maxAge")).thenReturn(defaultValues.get("maxAge")); - Mockito.when(recordingOptions.get("maxSize")).thenReturn(defaultValues.get("maxSize")); + Mockito.when(recordingOptions.get("toDisk")).thenReturn(originalValues.get("toDisk")); + Mockito.when(recordingOptions.get("maxAge")).thenReturn(originalValues.get("maxAge")); + Mockito.when(recordingOptions.get("maxSize")).thenReturn(originalValues.get("maxSize")); MultiMap requestAttrs = MultiMap.caseInsensitiveMultiMap(); - requestAttrs.addAll(defaultValues); + requestAttrs.addAll(originalValues); Mockito.when( connectionManager.executeConnectedTask( @@ -161,13 +161,13 @@ public Map answer(InvocationOnMock args) throws Throwable { @Test void shouldUnsetRecordingOptions() throws Exception { - Map defaultValues = + Map originalValues = Map.of("toDisk", "true", "maxAge", "50", "maxSize", "32"); Mockito.when(recordingOptionsBuilderFactory.create(Mockito.any())).thenReturn(builder); Mockito.when(builder.build()).thenReturn(recordingOptions); - Mockito.when(recordingOptions.get("toDisk")).thenReturn(defaultValues.get("toDisk")); - Mockito.when(recordingOptions.get("maxAge")).thenReturn(defaultValues.get("maxAge")); - Mockito.when(recordingOptions.get("maxSize")).thenReturn(defaultValues.get("maxSize")); + Mockito.when(recordingOptions.get("toDisk")).thenReturn(originalValues.get("toDisk")); + Mockito.when(recordingOptions.get("maxAge")).thenReturn(originalValues.get("maxAge")); + Mockito.when(recordingOptions.get("maxSize")).thenReturn(originalValues.get("maxSize")); MultiMap requestAttrs = MultiMap.caseInsensitiveMultiMap(); requestAttrs.addAll(Map.of("toDisk", "unset", "maxAge", "unset", "maxSize", "unset")); @@ -207,9 +207,9 @@ public Map answer(InvocationOnMock args) throws Throwable { @ParameterizedTest @MethodSource("getRequestMaps") - void shouldThrowInvalidOptionException(Map defaultValues) throws Exception { + void shouldThrowInvalidOptionException(Map values) throws Exception { MultiMap requestAttrs = MultiMap.caseInsensitiveMultiMap(); - requestAttrs.addAll(defaultValues); + requestAttrs.addAll(values); RoutingContext ctx = Mockito.mock(RoutingContext.class); HttpServerRequest req = Mockito.mock(HttpServerRequest.class);