@@ -876,22 +876,23 @@ public void testCreatePrincipalAndRotateCredentials() {
876876 @ Test
877877 public void testCreatePrincipalAndResetCredentialsWithCustomValues () {
878878 // Create a new principal using root user
879- Principal principal = Principal .builder ()
879+ Principal principal =
880+ Principal .builder ()
880881 .setName (client .newEntityName ("myprincipal-reset" ))
881882 .setProperties (Map .of ("custom-tag" , "bar" ))
882883 .build ();
883884
884- PrincipalWithCredentials creds = managementApi .createPrincipal (
885- new CreatePrincipalRequest (principal , true )
886- );
885+ PrincipalWithCredentials creds =
886+ managementApi .createPrincipal (new CreatePrincipalRequest (principal , true ));
887887
888- Map <String , String > customBody = Map .of (
888+ Map <String , String > customBody =
889+ Map .of (
889890 "clientId" , "f174b76a7e1a99e2" ,
890- "clientSecret" , "27029d236abc08e204922b0a07031bc2"
891- );
891+ "clientSecret" , "27029d236abc08e204922b0a07031bc2" );
892892
893893 PrincipalWithCredentials resetCreds ;
894- try (Response response = managementApi
894+ try (Response response =
895+ managementApi
895896 .request ("v1/principals/{p}/reset" , Map .of ("p" , principal .getName ()))
896897 .post (Entity .json (customBody ))) {
897898
@@ -900,24 +901,25 @@ public void testCreatePrincipalAndResetCredentialsWithCustomValues() {
900901 }
901902
902903 assertThat (resetCreds .getCredentials ().getClientId ()).isEqualTo ("f174b76a7e1a99e2" );
903- assertThat (resetCreds .getCredentials ().getClientSecret ()).isEqualTo ("27029d236abc08e204922b0a07031bc2" );
904+ assertThat (resetCreds .getCredentials ().getClientSecret ())
905+ .isEqualTo ("27029d236abc08e204922b0a07031bc2" );
904906
905907 // Principal itself tries to reset with custom creds → should fail (403 Forbidden)
906908 String principalToken = client .obtainToken (resetCreds );
907- customBody = Map .of (
909+ customBody =
910+ Map .of (
908911 "clientId" , "f174b76a7e1a99e3" ,
909- "clientSecret" , "27029d236abc08e204922b0a07031bc3"
910- );
911- try (Response response = client .managementApi (principalToken )
912+ "clientSecret" , "27029d236abc08e204922b0a07031bc3" );
913+ try (Response response =
914+ client
915+ .managementApi (principalToken )
912916 .request ("v1/principals/{p}/reset" , Map .of ("p" , principal .getName ()))
913917 .post (Entity .json (customBody ))) {
914918
915919 assertThat (response ).returns (Response .Status .FORBIDDEN .getStatusCode (), Response ::getStatus );
916920 }
917921 }
918922
919-
920-
921923 @ Test
922924 public void testCreateFederatedPrincipalRoleSucceeds () {
923925 // Create a federated Principal Role
0 commit comments