@Test
public void testFindDefaultPlanLocation() {

    Result<OpearFile> opearResult = OpearFile.fromDirectory(new File("src/test/resources/plans/bar"));
    assertFalse("opearResult should not be a failure", opearResult.isFailure());
    Result<URL> urlResult = opearResult.map(Opear::getDefaultPlan);
    assertFalse("urlResult should not be a failure", urlResult.isFailure());
    Result<OakpalPlan> planResult = urlResult.flatMap(OakpalPlan::fromJson);
    assertFalse("plan should load successfully", planResult.isFailure());
    List<String> checklists = planResult.map(OakpalPlan::getChecklists).getOrDefault(Collections.emptyList());
    assertEquals("checklists should contain test/bar checklist",
            Collections.singletonList("test/bar"), checklists);
    Result<OpearFile> notAPlanResult = OpearFile.fromDirectory(new File("src/test/resources/plans/none"));
    assertFalse("notAPlanResult should not be a failure", notAPlanResult.isFailure());
    Result<URL> notAPlanUrlResult = notAPlanResult.map(Opear::getDefaultPlan);
    assertFalse("notAPlanUrlResult should not be a failure", notAPlanUrlResult.isFailure());
    Result<OakpalPlan> notAPlanPlanResult = notAPlanUrlResult.flatMap(OakpalPlan::fromJson);
    assertFalse("notAPlanPlan should load successfully", notAPlanPlanResult.isFailure());
    List<String> notAPlanChecklists = notAPlanPlanResult.map(OakpalPlan::getChecklists).getOrDefault(Collections.emptyList());
    assertEquals("notAPlanChecklists should contain no checklists",
            Collections.singletonList("net.adamcin.oakpal.core/basic"), notAPlanChecklists);
}