diff --git a/src/main/resources/generator/server/springboot/cucumberauthentication/oauth2/AuthenticationSteps.java.mustache b/src/main/resources/generator/server/springboot/cucumberauthentication/oauth2/AuthenticationSteps.java.mustache index 6e6fa2b55ea..473322db427 100644 --- a/src/main/resources/generator/server/springboot/cucumberauthentication/oauth2/AuthenticationSteps.java.mustache +++ b/src/main/resources/generator/server/springboot/cucumberauthentication/oauth2/AuthenticationSteps.java.mustache @@ -94,8 +94,7 @@ public class AuthenticationSteps { @SuppressWarnings("java:S1144") private String token() { - return Jwts - .builder() + return Jwts.builder() .subject("authentication") .signWith(CucumberAuthenticationConfiguration.JWT_KEY) .claims(claims) diff --git a/src/main/resources/generator/server/springboot/custom-jhlite/test/CucumberConfiguration.java.mustache b/src/main/resources/generator/server/springboot/custom-jhlite/test/CucumberConfiguration.java.mustache index 00060fd1c36..36b305a4785 100644 --- a/src/main/resources/generator/server/springboot/custom-jhlite/test/CucumberConfiguration.java.mustache +++ b/src/main/resources/generator/server/springboot/custom-jhlite/test/CucumberConfiguration.java.mustache @@ -26,7 +26,13 @@ import {{packageName}}.cucumber.rest.CucumberRestTemplate; @ActiveProfiles("test") @CucumberContextConfiguration -@SpringBootTest(classes = { {{ baseName }}App.class, CucumberRestTemplateConfiguration.class }, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest( + classes = { + {{ baseName }}App.class, + CucumberRestTemplateConfiguration.class + }, + webEnvironment = WebEnvironment.RANDOM_PORT +) public class CucumberConfiguration { @Autowired diff --git a/src/main/resources/generator/server/springboot/database/mongodb/test/TestMongoDBManager.java.mustache b/src/main/resources/generator/server/springboot/database/mongodb/test/TestMongoDBManager.java.mustache index 07a8f8cc8df..cd9dfd287a8 100644 --- a/src/main/resources/generator/server/springboot/database/mongodb/test/TestMongoDBManager.java.mustache +++ b/src/main/resources/generator/server/springboot/database/mongodb/test/TestMongoDBManager.java.mustache @@ -22,11 +22,10 @@ public class TestMongoDBManager implements ApplicationListener assertNoRestClaimCall() { - return verify(rest, never()) - .exchange(anyString(), eq(HttpMethod.GET), any(HttpEntity.class), ArgumentMatchers.>any()); + return verify(rest, never()).exchange( + anyString(), + eq(HttpMethod.GET), + any(HttpEntity.class), + ArgumentMatchers.>any() + ); } @Test @@ -306,12 +310,14 @@ class CustomClaimConverterTest { } private void mockUser(ObjectNode user) { - when(rest.exchange(eq("http://jhipster.test"), eq(HttpMethod.GET), any(HttpEntity.class), ArgumentMatchers.>any())) - .thenReturn(ResponseEntity.ok(user)); + when( + rest.exchange(eq("http://jhipster.test"), eq(HttpMethod.GET), any(HttpEntity.class), ArgumentMatchers.>any()) + ).thenReturn(ResponseEntity.ok(user)); } private void mockRestTimeout() { - when(rest.exchange(eq("http://jhipster.test"), eq(HttpMethod.GET), any(HttpEntity.class), ArgumentMatchers.>any())) - .thenThrow(new ResourceAccessException(null, new SocketTimeoutException())); + when( + rest.exchange(eq("http://jhipster.test"), eq(HttpMethod.GET), any(HttpEntity.class), ArgumentMatchers.>any()) + ).thenThrow(new ResourceAccessException(null, new SocketTimeoutException())); } } diff --git a/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/test/infrastructure/primary/JwtGrantedAuthorityConverterTest.java.mustache b/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/test/infrastructure/primary/JwtGrantedAuthorityConverterTest.java.mustache index ac85d9f2a2d..b847f3d837d 100644 --- a/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/test/infrastructure/primary/JwtGrantedAuthorityConverterTest.java.mustache +++ b/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/test/infrastructure/primary/JwtGrantedAuthorityConverterTest.java.mustache @@ -24,8 +24,7 @@ class JwtGrantedAuthorityConverterTest { @Test void shouldConvert() { - Jwt jwt = Jwt - .withTokenValue("token") + Jwt jwt = Jwt.withTokenValue("token") .header("alg", JwsAlgorithms.RS256) .subject("jhipster") .claim("roles", List.of("ROLE_ADMIN")) diff --git a/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/test/infrastructure/primary/TestSecurityConfiguration.java.mustache b/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/test/infrastructure/primary/TestSecurityConfiguration.java.mustache index 036fcf0e92f..48e52b9af88 100644 --- a/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/test/infrastructure/primary/TestSecurityConfiguration.java.mustache +++ b/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/test/infrastructure/primary/TestSecurityConfiguration.java.mustache @@ -37,8 +37,7 @@ public class TestSecurityConfiguration { Map metadata = new HashMap<>(); metadata.put("end_session_endpoint", "https://jhipster.org/logout"); - return ClientRegistration - .withRegistrationId("oidc") + return ClientRegistration.withRegistrationId("oidc") .issuerUri("{baseUrl}") .redirectUri("{baseUrl}/{action}/oauth2/code/{registrationId}") .clientAuthenticationMethod(ClientAuthenticationMethod.CLIENT_SECRET_BASIC)