- final boolean result =
- new JavaTestKit.EventFilter<Boolean>(logLevel
- ) {
- @Override
- protected Boolean run() {
- return true;
- }
- }.from(subject.path().toString())
- .message(logMessage)
- .occurrences(1).exec();
-
- Assert.assertEquals(true, result);
-
+ final Boolean result = new EventFilter(logLevel, getSystem()).from(subject.path().toString())
+ .message(logMessage).occurrences(1).intercept(() -> Boolean.TRUE);
+ assertEquals(Boolean.TRUE, result);