@@ -105,7 +105,7 @@ void listStaticPoliciesShouldReturnPolicies() {
105105 .willReturn (aResponse ()
106106 .withStatus (200 )
107107 .withHeader ("Content-Type" , "application/json" )
108- .withBody ("[" + SAMPLE_STATIC_POLICY + "]" )));
108+ .withBody ("{ \" policies \" : [" + SAMPLE_STATIC_POLICY + "]} " )));
109109
110110 List <StaticPolicy > policies = axonflow .listStaticPolicies ();
111111
@@ -124,7 +124,7 @@ void listStaticPoliciesWithFiltersShouldIncludeQueryParams() {
124124 .willReturn (aResponse ()
125125 .withStatus (200 )
126126 .withHeader ("Content-Type" , "application/json" )
127- .withBody ("[" + SAMPLE_STATIC_POLICY + "]" )));
127+ .withBody ("{ \" policies \" : [" + SAMPLE_STATIC_POLICY + "]} " )));
128128
129129 ListStaticPoliciesOptions options = ListStaticPoliciesOptions .builder ()
130130 .category (PolicyCategory .SECURITY_SQLI )
@@ -255,7 +255,7 @@ void getEffectiveStaticPoliciesShouldReturnEffectivePolicies() {
255255 .willReturn (aResponse ()
256256 .withStatus (200 )
257257 .withHeader ("Content-Type" , "application/json" )
258- .withBody ("[" + SAMPLE_STATIC_POLICY + "]" )));
258+ .withBody ("{ \" static \" : [" + SAMPLE_STATIC_POLICY + "], \" dynamic \" : []} " )));
259259
260260 List <StaticPolicy > policies = axonflow .getEffectiveStaticPolicies ();
261261
@@ -268,7 +268,7 @@ void testPatternShouldTestPatternAgainstInputs() {
268268 String responseBody =
269269 "{" +
270270 "\" valid\" : true," +
271- "\" results \" : [" +
271+ "\" matches \" : [" +
272272 "{\" input\" : \" SELECT * FROM users\" , \" matched\" : true}," +
273273 "{\" input\" : \" Hello world\" , \" matched\" : false}" +
274274 "]" +
@@ -582,7 +582,7 @@ void createStaticPolicyRequestShouldHaveDefaults() {
582582 assertThat (request .getName ()).isEqualTo ("Test Policy" );
583583 assertThat (request .getCategory ()).isEqualTo (PolicyCategory .PII_GLOBAL );
584584 assertThat (request .isEnabled ()).isTrue ();
585- assertThat (request .getSeverity ()).isEqualTo (5 );
585+ assertThat (request .getSeverity ()).isEqualTo (PolicySeverity . MEDIUM );
586586 assertThat (request .getAction ()).isEqualTo (PolicyAction .BLOCK );
587587 }
588588
0 commit comments