@@ -170,7 +170,7 @@ private io.openaev.stix.types.List<Complex<CoverageResult>> predictCoverageFromI
170170 injects .stream ().map (Inject ::getId ).collect (Collectors .toSet ()));
171171 return toList (
172172 results .stream ()
173- .map (r -> new Complex <>(new CoverageResult (r .type ().name (), r .getSuccessRate ())))
173+ .map (r -> new Complex <>(new CoverageResult (r .type ().name (), r .getSuccessRate () * 100 )))
174174 .toList ());
175175 }
176176
@@ -315,7 +315,7 @@ public void whenAllAttackPatternsAreCoveredAndAllExpectationsAreSuccessful_bundl
315315 .getId ()
316316 .getValue ()
317317 .contains (securityPlatformWrapper .get ().getId ())
318- ? 1 .0
318+ ? 100 .0
319319 : 0.0 )),
320320 new Complex <>(
321321 new CoverageResult (
@@ -324,7 +324,7 @@ public void whenAllAttackPatternsAreCoveredAndAllExpectationsAreSuccessful_bundl
324324 .getId ()
325325 .getValue ()
326326 .contains (securityPlatformWrapper .get ().getId ())
327- ? 1 .0
327+ ? 100 .0
328328 : 0.0 ))))));
329329 assertThatJson (actualSro .toStix (mapper ))
330330 .whenIgnoringPaths (CommonProperties .ID .toString ())
@@ -357,8 +357,8 @@ public void whenAllAttackPatternsAreCoveredAndAllExpectationsAreSuccessful_bundl
357357 ExtendedProperties .COVERAGE .toString (),
358358 toList (
359359 List .of (
360- new Complex <>(new CoverageResult ("PREVENTION" , 1 .0 )),
361- new Complex <>(new CoverageResult ("DETECTION" , 1 .0 ))))));
360+ new Complex <>(new CoverageResult ("PREVENTION" , 100 .0 )),
361+ new Complex <>(new CoverageResult ("DETECTION" , 100 .0 ))))));
362362 assertThatJson (actualSro .toStix (mapper ))
363363 .whenIgnoringPaths (CommonProperties .ID .toString ())
364364 .isEqualTo (expectedSro .toStix (mapper ));
@@ -429,7 +429,7 @@ public void whenAllVulnerabilitiesAreCoveredAndAllExpectationsAreSuccessful_bund
429429 ExtendedProperties .COVERED .toString (),
430430 new io .openaev .stix .types .Boolean (true ),
431431 ExtendedProperties .COVERAGE .toString (),
432- toList (List .of (new Complex <>(new CoverageResult ("VULNERABILITY" , 1 .0 ))))));
432+ toList (List .of (new Complex <>(new CoverageResult ("VULNERABILITY" , 100 .0 ))))));
433433 assertThatJson (actualSro .toStix (mapper ))
434434 .whenIgnoringPaths (CommonProperties .ID .toString ())
435435 .isEqualTo (expectedSro .toStix (mapper ));
@@ -624,7 +624,7 @@ public void whenAllAttackPatternsAreCoveredAndHalfOfAllExpectationsAreSuccessful
624624 .getId ()
625625 .getValue ()
626626 .contains (securityPlatformWrapper .get ().getId ())
627- ? 0.5
627+ ? 50.0
628628 : 0.0 )),
629629 new Complex <>(
630630 new CoverageResult (
@@ -633,7 +633,7 @@ public void whenAllAttackPatternsAreCoveredAndHalfOfAllExpectationsAreSuccessful
633633 .getId ()
634634 .getValue ()
635635 .contains (securityPlatformWrapper .get ().getId ())
636- ? 0.5
636+ ? 50.0
637637 : 0.0 ))))));
638638 assertThatJson (actualSro .toStix (mapper ))
639639 .whenIgnoringPaths (CommonProperties .ID .toString ())
@@ -668,11 +668,11 @@ public void whenAllAttackPatternsAreCoveredAndHalfOfAllExpectationsAreSuccessful
668668 new Complex <>(
669669 new CoverageResult (
670670 "PREVENTION" ,
671- stixRef .getExternalRef ().equals ("T1234" ) ? 1 .0 : 0.0 )),
671+ stixRef .getExternalRef ().equals ("T1234" ) ? 100 .0 : 0.0 )),
672672 new Complex <>(
673673 new CoverageResult (
674674 "DETECTION" ,
675- stixRef .getExternalRef ().equals ("T1234" ) ? 1 .0 : 0.0 ))))));
675+ stixRef .getExternalRef ().equals ("T1234" ) ? 100 .0 : 0.0 ))))));
676676 assertThatJson (actualSro .toStix (mapper ))
677677 .whenIgnoringPaths (CommonProperties .ID .toString ())
678678 .isEqualTo (expectedSro .toStix (mapper ));
0 commit comments