From 214fe5e71f98962a3a4526a6c5e3f03de7432c63 Mon Sep 17 00:00:00 2001 From: mdsage1 Date: Wed, 8 Nov 2023 18:03:55 +0000 Subject: [PATCH] update controller advisor test formatting --- .../image/service/exception/ControllerAdvisorTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openchallenges/image-service/src/test/java/org/sagebionetworks/openchallenges/image/service/exception/ControllerAdvisorTest.java b/apps/openchallenges/image-service/src/test/java/org/sagebionetworks/openchallenges/image/service/exception/ControllerAdvisorTest.java index 813fffadfa..67e9e4dcbb 100644 --- a/apps/openchallenges/image-service/src/test/java/org/sagebionetworks/openchallenges/image/service/exception/ControllerAdvisorTest.java +++ b/apps/openchallenges/image-service/src/test/java/org/sagebionetworks/openchallenges/image/service/exception/ControllerAdvisorTest.java @@ -4,19 +4,18 @@ import static org.mockito.Mockito.when; import org.junit.jupiter.api.Test; -import org.springframework.http.HttpStatus; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.http.HttpStatus; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; import org.springframework.test.web.servlet.MockMvc; import org.springframework.validation.BindException; import org.springframework.validation.BindingResult; import org.springframework.validation.FieldError; - @SpringJUnitConfig @WebMvcTest(ControllerAdvisor.class) public class ControllerAdvisorTest { @@ -50,7 +49,8 @@ public void bindException_ShouldReturnResultAndException_WhenMockErrorIsPassed() // Create a mock BindingResult BindingResult bindingResult = new BindException(new Object(), "objectName"); bindingResult.addError(fieldError); - BindingResult handleBindException = new HandleBindException(bindException, header, status, webRequest); + BindingResult handleBindException = + new HandleBindException(bindException, header, status, webRequest); // // Set up the mock BindException to return the mock BindingResult when(bindException.getBindingResult()).thenReturn(bindingResult);