Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
53 0 0 0 100% 1.354 s

Note: failures are anticipated and checked for with assertions while errors are unanticipated.


Package List

[Summary] [Package List] [Test Cases]


Package Tests Errors Failures Skipped Success Rate Time
com.hsbc.fraud.engine 11 0 0 0 100% 0.032 s
com.hsbc.fraud.rules 36 0 0 0 100% 0.363 s
com.hsbc.fraud.processor 6 0 0 0 100% 0.959 s

Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.

com.hsbc.fraud.engine

- Class Tests Errors Failures Skipped Success Rate Time
FraudDetectionEngineTest 11 0 0 0 100% 0.032 s

com.hsbc.fraud.rules

- Class Tests Errors Failures Skipped Success Rate Time
TimeBasedAnomalyRuleTest 8 0 0 0 100% 0.198 s
GeographicAnomalyRuleTest 7 0 0 0 100% 0.014 s
HighValueTransactionRuleTest 11 0 0 0 100% 0.133 s
SuspiciousAccountRuleTest 10 0 0 0 100% 0.018 s

com.hsbc.fraud.processor

- Class Tests Errors Failures Skipped Success Rate Time
FraudDetectionProcessorTest 6 0 0 0 100% 0.959 s

Test Cases

[Summary] [Package List] [Test Cases]

TimeBasedAnomalyRuleTest

shouldTriggerForEarlyMorningTransaction 0.137 s
shouldTriggerForLateNightTransaction 0.005 s
shouldReturnCorrectRuleName 0.007 s
shouldHandleNullTimestamp 0.001 s
shouldNotTriggerAtEndBoundary 0.001 s
shouldNotTriggerForDaytimeTransaction 0.001 s
shouldHaveLowerPriority 0.006 s
shouldIncludeTimeInReason 0.002 s

FraudDetectionProcessorTest

shouldGenerateAlertForBlockedCountry 0.947 s
shouldGenerateAlertForSuspiciousAccount 0.001 s
shouldNotGenerateAlertForNormalTransaction 0.001 s
shouldHandleNullTransaction 0 s
shouldProcessMultipleTransactions 0.003 s
shouldGenerateAlertForHighValueTransaction 0.001 s

GeographicAnomalyRuleTest

shouldReturnCorrectRuleName 0.003 s
shouldHandleNullCountryCode 0.001 s
shouldNotTriggerForNormalCountries 0.001 s
shouldTriggerHighRiskForBlockedCountry 0.001 s
shouldHandleCaseInsensitiveCountryCodes 0 s
shouldAllowAddingHighRiskCountries 0.002 s
shouldTriggerForHighRiskCountry 0.001 s

HighValueTransactionRuleTest

shouldTriggerAtThreshold 0.005 s
shouldHandleNullTransaction 0.001 s
shouldReturnCorrectRuleName 0.001 s
shouldNotTriggerForLowValueTransaction 0.003 s
shouldCalculateProportionalRiskScore(double)[1] 0.017 s
shouldCalculateProportionalRiskScore(double)[2] 0.001 s
shouldCalculateProportionalRiskScore(double)[3] 0.001 s
shouldHandleNullAmount 0.001 s
shouldTriggerHighRiskForCriticalThreshold 0.001 s
shouldTriggerMaxRiskForVeryHighValues 0 s
shouldIncludeAmountInReason 0.001 s

FraudDetectionEngineTest

shouldDetectSuspiciousAccount 0.002 s
shouldAllowAddingCustomRules 0.001 s
shouldAllowRemovingRules 0.002 s
shouldHandleNullTransaction 0 s
shouldHandleMultipleTriggeredRules 0.004 s
shouldHaveDefaultRulesInitialized 0 s
shouldDetectBlacklistedAccount 0.008 s
shouldReturnCorrectSeverity 0.001 s
shouldDetectHighValueTransaction 0.002 s
shouldCalculateCombinedRiskScore 0.003 s
shouldNotAlertNormalTransaction 0.001 s

SuspiciousAccountRuleTest

shouldTriggerForSuspiciousTargetAccount 0.003 s
shouldHandleNullTransaction 0.001 s
shouldTriggerHighRiskForBlacklistedSourceAccount 0.002 s
shouldReturnCorrectRuleName 0.001 s
shouldTriggerForSuspiciousSourceAccount 0 s
shouldAllowAddingSuspiciousAccounts 0.001 s
shouldAllowRemovingSuspiciousAccounts 0 s
shouldTriggerHighRiskForBlacklistedTargetAccount 0.001 s
shouldNotTriggerForNormalAccounts 0.001 s
shouldPrioritizeBlacklistedOverSuspicious 0.001 s