@@ -739,7 +739,8 @@ public void readChanges() throws Exception {
739739 @ Test
740740 public void writeAuthorizationModelTest () throws Exception {
741741 // Given
742- String postUrl = String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
742+ String postUrl =
743+ String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
743744 String expectedBody =
744745 "{\" type_definitions\" :[{\" type\" :\" document\" ,\" relations\" :{},\" metadata\" :null}],\" schema_version\" :\" 1.1\" ,\" conditions\" :{}}" ;
745746 String responseBody = String .format ("{\" authorization_model_id\" :\" %s\" }" , DEFAULT_AUTH_MODEL_ID );
@@ -788,7 +789,8 @@ public void writeAuthorizationModel_bodyRequired() {
788789 @ Test
789790 public void writeAuthorizationModel_400 () throws Exception {
790791 // Given
791- 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 );
792794 mockHttpClient
793795 .onPost (postUrl )
794796 .doReturn (400 , "{\" code\" :\" validation_error\" ,\" message\" :\" Generic validation error\" }" );
@@ -810,7 +812,8 @@ public void writeAuthorizationModel_400() throws Exception {
810812 @ Test
811813 public void writeAuthorizationModel_404 () {
812814 // Given
813- String postUrl = String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
815+ String postUrl =
816+ String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
814817 mockHttpClient
815818 .onPost (postUrl )
816819 .doReturn (404 , "{\" code\" :\" undefined_endpoint\" ,\" message\" :\" Endpoint not enabled\" }" );
@@ -831,7 +834,8 @@ public void writeAuthorizationModel_404() {
831834 @ Test
832835 public void writeAuthorizationModel_500 () {
833836 // Given
834- String postUrl = String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
837+ String postUrl =
838+ String .format ("%s/stores/%s/authorization-models" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID );
835839 mockHttpClient
836840 .onPost (postUrl )
837841 .doReturn (500 , "{\" code\" :\" internal_error\" ,\" message\" :\" Internal Server Error\" }" );
@@ -858,9 +862,7 @@ public void readAuthorizationModelTest() throws Exception {
858862 // Given
859863 String getUrl = String .format (
860864 "%s/stores/%s/authorization-models/%s" ,
861- FgaConstants .TEST_API_URL ,
862- DEFAULT_STORE_ID ,
863- DEFAULT_AUTH_MODEL_ID );
865+ FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID );
864866 String getResponse = String .format (
865867 "{\" authorization_model\" :{\" id\" :\" %s\" ,\" schema_version\" :\" %s\" }}" ,
866868 DEFAULT_AUTH_MODEL_ID , DEFAULT_SCHEMA_VERSION );
@@ -885,9 +887,7 @@ public void readAuthorizationModelTest_withOptions() throws Exception {
885887 new ClientReadAuthorizationModelOptions ().authorizationModelId (authorizationModelId );
886888 String getUrl = String .format (
887889 "%s/stores/%s/authorization-models/%s" ,
888- FgaConstants .TEST_API_URL ,
889- DEFAULT_STORE_ID ,
890- authorizationModelId );
890+ FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , authorizationModelId );
891891 String getResponse = String .format (
892892 "{\" authorization_model\" :{\" id\" :\" %s\" ,\" schema_version\" :\" %s\" }}" ,
893893 authorizationModelId , DEFAULT_SCHEMA_VERSION );
@@ -938,9 +938,7 @@ public void readAuthorizationModel_400() {
938938 // Given
939939 String getUrl = String .format (
940940 "%s/stores/%s/authorization-models/%s" ,
941- FgaConstants .TEST_API_URL ,
942- DEFAULT_STORE_ID ,
943- DEFAULT_AUTH_MODEL_ID );
941+ FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID );
944942 mockHttpClient
945943 .onGet (getUrl )
946944 .doReturn (400 , "{\" code\" :\" validation_error\" ,\" message\" :\" Generic validation error\" }" );
@@ -963,9 +961,7 @@ public void readAuthorizationModel_404() throws Exception {
963961 // Given
964962 String getUrl = String .format (
965963 "%s/stores/%s/authorization-models/%s" ,
966- FgaConstants .TEST_API_URL ,
967- DEFAULT_STORE_ID ,
968- DEFAULT_AUTH_MODEL_ID );
964+ FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID );
969965 mockHttpClient
970966 .onGet (getUrl )
971967 .doReturn (404 , "{\" code\" :\" undefined_endpoint\" ,\" message\" :\" Endpoint not enabled\" }" );
@@ -987,9 +983,7 @@ public void readAuthorizationModel_500() throws Exception {
987983 // Given
988984 String getUrl = String .format (
989985 "%s/stores/%s/authorization-models/%s" ,
990- FgaConstants .TEST_API_URL ,
991- DEFAULT_STORE_ID ,
992- DEFAULT_AUTH_MODEL_ID );
986+ FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID );
993987 mockHttpClient
994988 .onGet (getUrl )
995989 .doReturn (500 , "{\" code\" :\" internal_error\" ,\" message\" :\" Internal Server Error\" }" );
@@ -2869,8 +2863,8 @@ public void listUsersTest() throws Exception {
28692863 @ Test
28702864 public void readAssertionsTest () throws Exception {
28712865 // Given
2872- String getUrl = String .format (
2873- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
2866+ String getUrl = String .format (String . format (
2867+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
28742868 String responseBody = String .format (
28752869 "{\" assertions\" :[{\" tuple_key\" :{\" user\" :\" %s\" ,\" relation\" :\" %s\" ,\" object\" :\" %s\" },\" expectation\" :true}]}" ,
28762870 DEFAULT_USER , DEFAULT_RELATION , DEFAULT_OBJECT );
@@ -2923,8 +2917,8 @@ public void readAssertions_authModelIdRequired() {
29232917 @ Test
29242918 public void readAssertions_400 () throws Exception {
29252919 // Given
2926- String getUrl = String .format (
2927- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
2920+ String getUrl = String .format (String . format (
2921+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
29282922 mockHttpClient
29292923 .onGet (getUrl )
29302924 .doReturn (400 , "{\" code\" :\" validation_error\" ,\" message\" :\" Generic validation error\" }" );
@@ -2945,8 +2939,8 @@ public void readAssertions_400() throws Exception {
29452939 @ Test
29462940 public void readAssertions_404 () throws Exception {
29472941 // Given
2948- String getUrl = String .format (
2949- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
2942+ String getUrl = String .format (String . format (
2943+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
29502944 mockHttpClient
29512945 .onGet (getUrl )
29522946 .doReturn (404 , "{\" code\" :\" undefined_endpoint\" ,\" message\" :\" Endpoint not enabled\" }" );
@@ -2966,8 +2960,8 @@ public void readAssertions_404() throws Exception {
29662960 @ Test
29672961 public void readAssertions_500 () throws Exception {
29682962 // Given
2969- String getUrl = String .format (
2970- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
2963+ String getUrl = String .format (String . format (
2964+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
29712965 mockHttpClient
29722966 .onGet (getUrl )
29732967 .doReturn (500 , "{\" code\" :\" internal_error\" ,\" message\" :\" Internal Server Error\" }" );
@@ -2990,8 +2984,8 @@ public void readAssertions_500() throws Exception {
29902984 @ Test
29912985 public void writeAssertionsTest () throws Exception {
29922986 // Given
2993- String putUrl = String .format (
2994- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
2987+ String putUrl = String .format (String . format (
2988+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
29952989 String expectedBody = String .format (
29962990 "{\" assertions\" :[{\" tuple_key\" :{\" object\" :\" %s\" ,\" relation\" :\" %s\" ,\" user\" :\" %s\" },\" expectation\" :true,\" contextual_tuples\" :[],\" context\" :null}]}" ,
29972991 DEFAULT_OBJECT , DEFAULT_RELATION , DEFAULT_USER );
@@ -3042,8 +3036,8 @@ public void writeAssertions_authModelIdRequired() {
30423036 @ Test
30433037 public void writeAssertions_400 () throws Exception {
30443038 // Given
3045- String putUrl = String .format (
3046- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
3039+ String putUrl = String .format (String . format (
3040+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
30473041 mockHttpClient
30483042 .onPut (putUrl )
30493043 .doReturn (400 , "{\" code\" :\" validation_error\" ,\" message\" :\" Generic validation error\" }" );
@@ -3064,8 +3058,8 @@ public void writeAssertions_400() throws Exception {
30643058 @ Test
30653059 public void writeAssertions_404 () throws Exception {
30663060 // Given
3067- String putUrl = String .format (
3068- String . format ( "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
3061+ String putUrl = String .format (String . format (
3062+ "%s/stores/%s/assertions/%s" , FgaConstants .TEST_API_URL , DEFAULT_STORE_ID , DEFAULT_AUTH_MODEL_ID ));
30693063 mockHttpClient
30703064 .onPut (putUrl )
30713065 .doReturn (404 , "{\" code\" :\" undefined_endpoint\" ,\" message\" :\" Endpoint not enabled\" }" );
0 commit comments