Change (final FilePath file, Condition<Change> check) { Change change = changeListManager.getChange(file); assertTrue(String.format("Wrong change: %s\nAll changes: %s", change, changeListManager.getAllChanges()), change != null && check.value(change)); return change; }