void (String expected) { // we want to specify unix-like paths in "expected", because they are easier to write :) String detected = detect(); detected = convertBack(detected); Assert.assertEquals("Incorrect executable detected", expected, detected); }