@@ -1054,7 +1054,7 @@ void shouldCreateApprovedResult() {
10541054 Instant expiresAt = Instant .now ().plusSeconds (300 );
10551055
10561056 PolicyApprovalResult result = new PolicyApprovalResult (
1057- "ctx-123" , true , data , policies , expiresAt , null , null , "5.2ms"
1057+ "ctx-123" , true , false , data , policies , expiresAt , null , null , "5.2ms"
10581058 );
10591059
10601060 assertThat (result .getContextId ()).isEqualTo ("ctx-123" );
@@ -1070,7 +1070,7 @@ void shouldCreateApprovedResult() {
10701070 @ DisplayName ("should create blocked result" )
10711071 void shouldCreateBlockedResult () {
10721072 PolicyApprovalResult result = new PolicyApprovalResult (
1073- null , false , null , null , null ,
1073+ null , false , false , null , null , null ,
10741074 "Request blocked by policy: pii-detection" , null , "3.1ms"
10751075 );
10761076
@@ -1085,13 +1085,13 @@ void shouldCheckExpiration() {
10851085 Instant past = Instant .now ().minusSeconds (3600 );
10861086
10871087 PolicyApprovalResult notExpired = new PolicyApprovalResult (
1088- "ctx" , true , null , null , future , null , null , null
1088+ "ctx" , true , false , null , null , future , null , null , null
10891089 );
10901090 PolicyApprovalResult expired = new PolicyApprovalResult (
1091- "ctx" , true , null , null , past , null , null , null
1091+ "ctx" , true , false , null , null , past , null , null , null
10921092 );
10931093 PolicyApprovalResult noExpiry = new PolicyApprovalResult (
1094- "ctx" , true , null , null , null , null , null , null
1094+ "ctx" , true , false , null , null , null , null , null , null
10951095 );
10961096
10971097 assertThat (notExpired .isExpired ()).isFalse ();
@@ -1103,7 +1103,7 @@ void shouldCheckExpiration() {
11031103 @ DisplayName ("should extract blocking policy name - format 1" )
11041104 void shouldExtractBlockingPolicyNameFormat1 () {
11051105 PolicyApprovalResult result = new PolicyApprovalResult (
1106- null , false , null , null , null ,
1106+ null , false , false , null , null , null ,
11071107 "Request blocked by policy: my-policy" , null , null
11081108 );
11091109
@@ -1114,7 +1114,7 @@ void shouldExtractBlockingPolicyNameFormat1() {
11141114 @ DisplayName ("should extract blocking policy name - format 2" )
11151115 void shouldExtractBlockingPolicyNameFormat2 () {
11161116 PolicyApprovalResult result = new PolicyApprovalResult (
1117- null , false , null , null , null ,
1117+ null , false , false , null , null , null ,
11181118 "Blocked by policy: another-policy" , null , null
11191119 );
11201120
@@ -1125,7 +1125,7 @@ void shouldExtractBlockingPolicyNameFormat2() {
11251125 @ DisplayName ("should extract blocking policy name - bracket format" )
11261126 void shouldExtractBlockingPolicyNameBracket () {
11271127 PolicyApprovalResult result = new PolicyApprovalResult (
1128- null , false , null , null , null ,
1128+ null , false , false , null , null , null ,
11291129 "[policy-name] Description of violation" , null , null
11301130 );
11311131
@@ -1136,7 +1136,7 @@ void shouldExtractBlockingPolicyNameBracket() {
11361136 @ DisplayName ("should return full reason when no pattern matches" )
11371137 void shouldReturnFullReasonWhenNoPattern () {
11381138 PolicyApprovalResult result = new PolicyApprovalResult (
1139- null , false , null , null , null ,
1139+ null , false , false , null , null , null ,
11401140 "Generic block reason" , null , null
11411141 );
11421142
@@ -1147,7 +1147,7 @@ void shouldReturnFullReasonWhenNoPattern() {
11471147 @ DisplayName ("should return null for null block reason" )
11481148 void shouldReturnNullForNullBlockReason () {
11491149 PolicyApprovalResult result = new PolicyApprovalResult (
1150- "ctx" , true , null , null , null , null , null , null
1150+ "ctx" , true , false , null , null , null , null , null , null
11511151 );
11521152
11531153 assertThat (result .getBlockingPolicyName ()).isNull ();
@@ -1157,7 +1157,7 @@ void shouldReturnNullForNullBlockReason() {
11571157 @ DisplayName ("should handle null collections" )
11581158 void shouldHandleNullCollections () {
11591159 PolicyApprovalResult result = new PolicyApprovalResult (
1160- "ctx" , true , null , null , null , null , null , null
1160+ "ctx" , true , false , null , null , null , null , null , null
11611161 );
11621162
11631163 assertThat (result .getApprovedData ()).isEmpty ();
@@ -1167,9 +1167,9 @@ void shouldHandleNullCollections() {
11671167 @ Test
11681168 @ DisplayName ("should implement equals and hashCode" )
11691169 void shouldImplementEqualsAndHashCode () {
1170- PolicyApprovalResult r1 = new PolicyApprovalResult ("c1" , true , null , null , null , null , null , null );
1171- PolicyApprovalResult r2 = new PolicyApprovalResult ("c1" , true , null , null , null , null , null , null );
1172- PolicyApprovalResult r3 = new PolicyApprovalResult ("c2" , true , null , null , null , null , null , null );
1170+ PolicyApprovalResult r1 = new PolicyApprovalResult ("c1" , true , false , null , null , null , null , null , null );
1171+ PolicyApprovalResult r2 = new PolicyApprovalResult ("c1" , true , false , null , null , null , null , null , null );
1172+ PolicyApprovalResult r3 = new PolicyApprovalResult ("c2" , true , false , null , null , null , null , null , null );
11731173
11741174 assertThat (r1 ).isEqualTo (r2 );
11751175 assertThat (r1 .hashCode ()).isEqualTo (r2 .hashCode ());
@@ -1180,7 +1180,7 @@ void shouldImplementEqualsAndHashCode() {
11801180 @ DisplayName ("should have toString" )
11811181 void shouldHaveToString () {
11821182 PolicyApprovalResult result = new PolicyApprovalResult (
1183- "ctx-abc" , true , null , Arrays .asList ("p1" ), null , null , null , "1ms"
1183+ "ctx-abc" , true , false , null , Arrays .asList ("p1" ), null , null , null , "1ms"
11841184 );
11851185 assertThat (result .toString ()).contains ("PolicyApprovalResult" ).contains ("ctx-abc" );
11861186 }
0 commit comments