Refactored NewWarningDetectorTest.java