@@ -789,7 +789,8 @@ public void readChanges() throws Exception {
789789 @ Test
790790 public void writeAuthorizationModelTest () throws Exception {
791791 // Given
792- String postUrl = String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
792+ String postUrl =
793+ String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
793794 String expectedBody =
794795 "{\" type_definitions\" :[{\" type\" :\" document\" ,\" relations\" :{},\" metadata\" :null}],\" schema_version\" :\" 1.1\" ,\" conditions\" :{}}" ;
795796 String responseBody = String .format ("{\" authorization_model_id\" :\" %s\" }" , DEFAULT_AUTH_MODEL_ID );
@@ -838,7 +839,8 @@ public void writeAuthorizationModel_bodyRequired() {
838839 @ Test
839840 public void writeAuthorizationModel_400 () throws Exception {
840841 // Given
841- String postUrl = String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
842+ String postUrl =
843+ String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
842844 mockHttpClient
843845 .onPost (postUrl )
844846 .doReturn (400 , "{\" code\" :\" validation_error\" ,\" message\" :\" Generic validation error\" }" );
@@ -860,7 +862,8 @@ public void writeAuthorizationModel_400() throws Exception {
860862 @ Test
861863 public void writeAuthorizationModel_404 () {
862864 // Given
863- String postUrl = String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
865+ String postUrl =
866+ String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
864867 mockHttpClient
865868 .onPost (postUrl )
866869 .doReturn (404 , "{\" code\" :\" undefined_endpoint\" ,\" message\" :\" Endpoint not enabled\" }" );
@@ -881,7 +884,8 @@ public void writeAuthorizationModel_404() {
881884 @ Test
882885 public void writeAuthorizationModel_500 () {
883886 // Given
884- String postUrl = String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
887+ String postUrl =
888+ String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
885889 mockHttpClient
886890 .onPost (postUrl )
887891 .doReturn (500 , "{\" code\" :\" internal_error\" ,\" message\" :\" Internal Server Error\" }" );
@@ -908,9 +912,7 @@ public void readAuthorizationModelTest() throws Exception {
908912 // Given
909913 String getUrl = String .format (
910914 "%s/stores/%s/authorization-models/%s" ,
911- FgaConstants .TEST_API_URL ,
912- DEFAULT_STORE_ID ,
913- DEFAULT_AUTH_MODEL_ID );
915+ FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID );
914916 String getResponse = String .format (
915917 "{\" authorization_model\" :{\" id\" :\" %s\" ,\" schema_version\" :\" %s\" }}" ,
916918 DEFAULT_AUTH_MODEL_ID , DEFAULT_SCHEMA_VERSION );
@@ -935,9 +937,7 @@ public void readAuthorizationModelTest_withOptions() throws Exception {
935937 new ClientReadAuthorizationModelOptions ().authorizationModelId (authorizationModelId );
936938 String getUrl = String .format (
937939 "%s/stores/%s/authorization-models/%s" ,
938- FgaConstants .TEST_API_URL ,
939- DEFAULT_STORE_ID ,
940- authorizationModelId );
940+ FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , authorizationModelId );
941941 String getResponse = String .format (
942942 "{\" authorization_model\" :{\" id\" :\" %s\" ,\" schema_version\" :\" %s\" }}" ,
943943 authorizationModelId , DEFAULT_SCHEMA_VERSION );
@@ -988,9 +988,7 @@ public void readAuthorizationModel_400() {
988988 // Given
989989 String getUrl = String .format (
990990 "%s/stores/%s/authorization-models/%s" ,
991- FgaConstants .TEST_API_URL ,
992- DEFAULT_STORE_ID ,
993- DEFAULT_AUTH_MODEL_ID );
991+ FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID );
994992 mockHttpClient
995993 .onGet (getUrl )
996994 .doReturn (400 , "{\" code\" :\" validation_error\" ,\" message\" :\" Generic validation error\" }" );
@@ -1013,9 +1011,7 @@ public void readAuthorizationModel_404() throws Exception {
10131011 // Given
10141012 String getUrl = String .format (
10151013 "%s/stores/%s/authorization-models/%s" ,
1016- FgaConstants .TEST_API_URL ,
1017- DEFAULT_STORE_ID ,
1018- DEFAULT_AUTH_MODEL_ID );
1014+ FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID );
10191015 mockHttpClient
10201016 .onGet (getUrl )
10211017 .doReturn (404 , "{\" code\" :\" undefined_endpoint\" ,\" message\" :\" Endpoint not enabled\" }" );
@@ -1037,9 +1033,7 @@ public void readAuthorizationModel_500() throws Exception {
10371033 // Given
10381034 String getUrl = String .format (
10391035 "%s/stores/%s/authorization-models/%s" ,
1040- FgaConstants .TEST_API_URL ,
1041- DEFAULT_STORE_ID ,
1042- DEFAULT_AUTH_MODEL_ID );
1036+ FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID );
10431037 mockHttpClient
10441038 .onGet (getUrl )
10451039 .doReturn (500 , "{\" code\" :\" internal_error\" ,\" message\" :\" Internal Server Error\" }" );
@@ -2919,8 +2913,8 @@ public void listUsersTest() throws Exception {
29192913 @ Test
29202914 public void readAssertionsTest () throws Exception {
29212915 // Given
2922- String getUrl = String .format (
2923- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
2916+ String getUrl = String .format (String . format (
2917+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
29242918 String responseBody = String .format (
29252919 "{\" assertions\" :[{\" tuple_key\" :{\" user\" :\" %s\" ,\" relation\" :\" %s\" ,\" object\" :\" %s\" },\" expectation\" :true}]}" ,
29262920 DEFAULT_USER , DEFAULT_RELATION , DEFAULT_OBJECT );
@@ -2973,8 +2967,8 @@ public void readAssertions_authModelIdRequired() {
29732967 @ Test
29742968 public void readAssertions_400 () throws Exception {
29752969 // Given
2976- String getUrl = String .format (
2977- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
2970+ String getUrl = String .format (String . format (
2971+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
29782972 mockHttpClient
29792973 .onGet (getUrl )
29802974 .doReturn (400 , "{\" code\" :\" validation_error\" ,\" message\" :\" Generic validation error\" }" );
@@ -2995,8 +2989,8 @@ public void readAssertions_400() throws Exception {
29952989 @ Test
29962990 public void readAssertions_404 () throws Exception {
29972991 // Given
2998- String getUrl = String .format (
2999- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
2992+ String getUrl = String .format (String . format (
2993+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
30002994 mockHttpClient
30012995 .onGet (getUrl )
30022996 .doReturn (404 , "{\" code\" :\" undefined_endpoint\" ,\" message\" :\" Endpoint not enabled\" }" );
@@ -3016,8 +3010,8 @@ public void readAssertions_404() throws Exception {
30163010 @ Test
30173011 public void readAssertions_500 () throws Exception {
30183012 // Given
3019- String getUrl = String .format (
3020- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
3013+ String getUrl = String .format (String . format (
3014+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
30213015 mockHttpClient
30223016 .onGet (getUrl )
30233017 .doReturn (500 , "{\" code\" :\" internal_error\" ,\" message\" :\" Internal Server Error\" }" );
@@ -3040,8 +3034,8 @@ public void readAssertions_500() throws Exception {
30403034 @ Test
30413035 public void writeAssertionsTest () throws Exception {
30423036 // Given
3043- String putUrl = String .format (
3044- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
3037+ String putUrl = String .format (String . format (
3038+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
30453039 String expectedBody = String .format (
30463040 "{\" assertions\" :[{\" tuple_key\" :{\" object\" :\" %s\" ,\" relation\" :\" %s\" ,\" user\" :\" %s\" },\" expectation\" :true,\" contextual_tuples\" :[],\" context\" :null}]}" ,
30473041 DEFAULT_OBJECT , DEFAULT_RELATION , DEFAULT_USER );
@@ -3092,8 +3086,8 @@ public void writeAssertions_authModelIdRequired() {
30923086 @ Test
30933087 public void writeAssertions_400 () throws Exception {
30943088 // Given
3095- String putUrl = String .format (
3096- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
3089+ String putUrl = String .format (String . format (
3090+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
30973091 mockHttpClient
30983092 .onPut (putUrl )
30993093 .doReturn (400 , "{\" code\" :\" validation_error\" ,\" message\" :\" Generic validation error\" }" );
@@ -3114,8 +3108,8 @@ public void writeAssertions_400() throws Exception {
31143108 @ Test
31153109 public void writeAssertions_404 () throws Exception {
31163110 // Given
3117- String putUrl = String .format (
3118- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
3111+ String putUrl = String .format (String . format (
3112+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
31193113 mockHttpClient
31203114 .onPut (putUrl )
31213115 .doReturn (404 , "{\" code\" :\" undefined_endpoint\" ,\" message\" :\" Endpoint not enabled\" }" );
0 commit comments