public boolean matches(Object obj) {
        Trigger trigger = (Trigger) obj;

        return trigger.equals(
                obligationWithTriggerAtTime.getTriggersSet().getTrigger().get(0).getValue())
            || trigger.equals(
                obligationWithTriggerPeriodic.getTriggersSet().getTrigger().get(0).getValue());
      }
    public boolean matches(Object obj) {
      ObligationTrigger ot = (ObligationTrigger) obj;

      for (Obligation ob : obligationSet.getObligation()) {
        String actualTriggerName = ot.getTriggerName();
        String expectedTriggerName = ob.getTriggersSet().getTrigger().get(0).getName().toString();

        Trigger actualTrigger = ot.getTrigger();
        Trigger expectedTrigger = ob.getTriggersSet().getTrigger().get(0).getValue();

        if (ot.getAction().equals(ob.getActionValue())
            && actualTriggerName.equals(expectedTriggerName)
            && actualTrigger.equals(expectedTrigger)) {
          return true;
        }
      }

      return false;
    }