@Test
 public void testSetFiredPlusOne() {
   NodeInstanceMediatorService nims = mock(NodeInstanceMediatorService.class);
   nims.setSequenceFlowsFired("47", 0);
   int plusOne = GatewayUtil.setFiredPlusOne(nims, "47");
   assertEquals(1, plusOne);
 }
  public boolean invokeListener(Gateway gateway, String method, Map data) {
    data = GatewayUtil.toCFML(data);

    GatewayEntry entry = getGatewayEntry(gateway);
    String cfcPath = entry.getListenerCfcPath();
    if (!Util.isEmpty(cfcPath, true)) {
      try {
        if (!callOneWay(
            cfcPath, gateway.getId(), method, Caster.toStruct(data, null, false), false))
          log(
              gateway,
              LOGLEVEL_ERROR,
              "function ["
                  + method
                  + "] does not exist in cfc ["
                  + getCFCDirectory()
                  + toRequestURI(cfcPath)
                  + "]");
        else return true;
      } catch (PageException e) {
        e.printStackTrace();
        log(gateway, LOGLEVEL_ERROR, e.getMessage());
      }
    } else log(gateway, LOGLEVEL_ERROR, "there is no listener cfc defined");
    return false;
  }
 /** @see org.opencfml.eventgateway.GatewayEngine#toRequestURI(java.lang.String) */
 public String toRequestURI(String cfcPath) {
   return GatewayUtil.toRequestURI(cfcPath);
 }