@@ -83,7 +83,8 @@ public static int createUserIdentity(String userIdentity, String environmentApiK
8383 return RestAssured .given ()
8484 .body (ImmutableMap .of (
8585 "identifier" , userIdentity ,
86- "environment" , environmentApiKey ))
86+ "environment" , environmentApiKey
87+ ))
8788 .headers (defaultHeaders ())
8889 .post ("/api/v1/environments/{apiKey}/identities/" , environmentApiKey )
8990 .then ()
@@ -97,7 +98,8 @@ public static Map<String, Object> createEnvironment(String name, int projectId)
9798 return RestAssured .given ()
9899 .body (ImmutableMap .of (
99100 "name" , name ,
100- "project" , projectId ))
101+ "project" , projectId
102+ ))
101103 .headers (defaultHeaders ())
102104 .post ("/api/v1/environments/" )
103105 .then ()
@@ -121,7 +123,8 @@ public static void switchFlag(int featureId, boolean enabled, String apiKey) {
121123 RestAssured .given ()
122124 .body (ImmutableMap .of (
123125 "enabled" , enabled ,
124- "feature" , featureId ))
126+ "feature" , featureId
127+ ))
125128 .headers (defaultHeaders ())
126129 .post ("/api/v1/environments/{apiKey}/featurestates/" , apiKey )
127130 .then ()
@@ -137,7 +140,8 @@ public static void switchFlag(int featureId, boolean enabled, String apiKey) {
137140 RestAssured .given ()
138141 .body (ImmutableMap .of (
139142 "enabled" , enabled ,
140- "feature" , featureId ))
143+ "feature" , featureId
144+ ))
141145 .headers (defaultHeaders ())
142146 .put ("/api/v1/environments/{apiKey}/featurestates/{featureStateId}/" ,
143147 apiKey , featureStateId )
@@ -166,7 +170,8 @@ public static void switchFlagForUser(int featureId, int userIdentityId, boolean
166170 RestAssured .given ()
167171 .body (ImmutableMap .of (
168172 "enabled" , enabled ,
169- "feature" , featureId ))
173+ "feature" , featureId
174+ ))
170175 .headers (defaultHeaders ())
171176 .post ("/api/v1/environments/{apiKey}/identities/{identityId}/featurestates/" , apiKey ,
172177 userIdentityId )
@@ -187,7 +192,8 @@ public static void switchFlagForUser(int featureId, int userIdentityId, boolean
187192 RestAssured .given ()
188193 .body (ImmutableMap .of (
189194 "enabled" , enabled ,
190- "feature" , featureId ))
195+ "feature" , featureId
196+ ))
191197 .headers (defaultHeaders ())
192198 .put (
193199 "/api/v1/environments/{apiKey}/identities/{identityId}/featurestates/{featureStateId}/" ,
@@ -207,7 +213,8 @@ public static void assignTraitToUserIdentity(String userIdentifier, String trait
207213 .body (ImmutableMap .of (
208214 "identity" , ImmutableMap .of ("identifier" , userIdentifier ),
209215 "trait_key" , traitKey ,
210- "trait_value" , traitValue ))
216+ "trait_value" , traitValue
217+ ))
211218 .headers (defaultHeaders ())
212219 .header ("x-environment-key" , apiKey )
213220 .post ("/api/v1/traits/" )
@@ -219,7 +226,8 @@ public static int createProject(String name, int organisationId) {
219226 return RestAssured .given ()
220227 .body (ImmutableMap .of (
221228 "name" , name ,
222- "organisation" , organisationId ))
229+ "organisation" , organisationId
230+ ))
223231 .headers (defaultHeaders ())
224232 .post ("/api/v1/projects/" )
225233 .then ()
@@ -230,7 +238,8 @@ public static int createProject(String name, int organisationId) {
230238 }
231239
232240 public static BaseFlag flag (
233- String name , String description , String type , boolean enabled , String value ) {
241+ String name , String description , String type , boolean enabled , String value
242+ ) {
234243 final FeatureStateModel result = new FeatureStateModel ();
235244 result .setEnabled (enabled );
236245 result .setValue (value );
@@ -372,8 +381,8 @@ public static List<FeatureStateModel> getFlags() {
372381 try {
373382 return MapperFactory .getMapper ().readValue (
374383 featureJson ,
375- new TypeReference <List <FeatureStateModel >>() {
376- } );
384+ new TypeReference <List <FeatureStateModel >>() {}
385+ );
377386 } catch (JsonProcessingException e ) {
378387 e .printStackTrace ();
379388 // environment model json
@@ -430,7 +439,7 @@ public static JsonNode getIdentityRequest(String identifier, List<? extends Trai
430439 }
431440
432441 public static JsonNode getIdentityRequest (
433- String identifier , List <? extends TraitModel > traits , boolean isTransient ) {
442+ String identifier , List <? extends TraitModel > traits , boolean isTransient ) {
434443 final ObjectNode flagsAndTraits = MapperFactory .getMapper ().createObjectNode ();
435444 flagsAndTraits .putPOJO ("identifier" , identifier );
436445 flagsAndTraits .put ("transient" , isTransient );
0 commit comments