@Test
  public void testDAO() throws IOException {

    Resource resource = context.getResource("data");
    File dir = resource.getFile();
    assertTrue(dir.exists());

    File file = new File(dir, "flow1.xml");
    assertTrue(file.exists());

    XStreamFlowConfigurationDAO dao =
        new XStreamFlowConfigurationDAO(dir.getAbsolutePath(), createAlias());
    FileBasedFlowConfiguration fbfc = dao.find("flow1", false);

    assertNotNull(fbfc);

    assertEquals(fbfc.getId(), "flow1");
    assertEquals(fbfc.getName(), "flow1name");
    assertEquals(fbfc.getDescription(), "flow1desc");

    FileBasedEventGeneratorConfiguration fbegc =
        (FileBasedEventGeneratorConfiguration) fbfc.getEventGeneratorConfiguration();
    assertNotNull(fbegc);

    FileBasedEventConsumerConfiguration fbecc =
        (FileBasedEventConsumerConfiguration) fbfc.getEventConsumerConfiguration();
    assertNotNull(fbecc);

    List<? extends ActionConfiguration> lac = fbecc.getActions();
    assertNull(lac);
  }