}
private Matcher<TaskDetails> isTask(final Task task) {
return new BaseMatcher<TaskDetails>() {
public boolean matches(Object o) {
TaskDetails other = (TaskDetails) o;
return other.getPath().equals(Path.path(task.getName()));
}
public void describeTo(Description description) {
description.appendText("is ").appendValue(task);
}