@Test
  public void test_getLogs() throws Exception {
    startLogManagerAgent();

    story
        .record()
        .startTester("gui-agent")
        .sendMessage(
            Performative.QUERY,
            RequestProtocol.QUERY,
            new Aid("bebel"),
            AdministrationOntology.GET_LOG_FILES_ACTION)
        .then()
        .receiveMessage()
        .assertReceivedMessage(
            matchContent(
                "<list>\n"
                    + "  <string>server.log</string>\n"
                    + "  <string>mad.log</string>\n"
                    + "</list>"));

    story.record().addAssert(AgentAssert.log(log, "getLogFiles()"));

    story.execute();
  }
  @Test
  public void test_readLog() throws Exception {
    startLogManagerAgent();

    story
        .record()
        .startTester("gui-agent")
        .sendMessage(
            Performative.REQUEST,
            RequestProtocol.REQUEST,
            new Aid("bebel"),
            AdministrationOntology.READ_LOG_ACTION + " server.log")
        .then()
        .receiveMessage()
        .assertReceivedMessage(
            and(
                matchPerformative(Performative.INFORM),
                matchContent("<string>Content of server.log</string>")));

    story.record().addAssert(AgentAssert.log(log, "readLog(server.log)"));

    story.execute();
  }
 private void startPluginManagerAgent(LogReaderMock logManager) {
   story.record().startAgent("bebel", new LogReaderAgent(logManager));
   story
       .record()
       .assertAgentWithService(new String[] {"bebel"}, Constants.MANAGE_LOGS_SERVICE_TYPE);
 }