---
inputType: CA10__CaAwsInstance__c
conditions:
  - status: COMPLIANT
    currentStateMessage: Word-1
    check:
      UNIT_TEST:
        id: Word-1
        expected:
          text: "unitTest(Word-1): not('abcklmxyz'.endsWith('abc'))"
        arg:
          NOT:
            arg:
              ENDS_WITH:
                arg:
                  TEXT: "abcklmxyz"
                search:
                  TEXT: "abc"
  - status: COMPLIANT
    currentStateMessage: Word-2
    check:
      UNIT_TEST:
        id: Word-2
        expected:
          text: "unitTest(Word-2): not('abcklmxyz'.endsWith('klm'))"
        arg:
          NOT:
            arg:
              ENDS_WITH:
                arg:
                  TEXT: "abcklmxyz"
                search:
                  TEXT: "klm"
  - status: COMPLIANT
    currentStateMessage: Word-3
    check:
      UNIT_TEST:
        id: Word-3
        expected:
          text: "unitTest(Word-3): 'abcklmxyz'.endsWith('xyz')"
        arg:
          ENDS_WITH:
            arg:
              TEXT: "abcklmxyz"
            search:
              TEXT: "xyz"
  - status: COMPLIANT
    currentStateMessage: Word-4
    check:
      UNIT_TEST:
        id: Word-4
        expected:
          text: "unitTest(Word-4): not('abcklmxyz'.endsWith('123'))"
        arg:
          NOT:
            arg:
              ENDS_WITH:
                arg:
                  TEXT: "abcklmxyz"
                search:
                  TEXT: "123"
  - status: COMPLIANT
    currentStateMessage: Multiple-1
    check:
      UNIT_TEST:
        id: Multiple-1
        expected:
          text: "unitTest(Multiple-1): not('abc klm xyz'.endsWith('abc'))"
        arg:
          NOT:
            arg:
              ENDS_WITH:
                arg:
                  TEXT: "abc klm xyz"
                search:
                  TEXT: "abc"
  - status: COMPLIANT
    currentStateMessage: Multiple-2
    check:
      UNIT_TEST:
        id: Multiple-2
        expected:
          text: "unitTest(Multiple-2): not('abc klm xyz'.endsWith('klm'))"
        arg:
          NOT:
            arg:
              ENDS_WITH:
                arg:
                  TEXT: "abc klm xyz"
                search:
                  TEXT: "klm"
  - status: COMPLIANT
    currentStateMessage: Multiple-3
    check:
      UNIT_TEST:
        id: Multiple-3
        expected:
          text: "unitTest(Multiple-3): 'abc klm xyz'.endsWith('xyz')"
        arg:
          ENDS_WITH:
            arg:
              TEXT: "abc klm xyz"
            search:
              TEXT: "xyz"
  - status: COMPLIANT
    currentStateMessage: Multiple-4
    check:
      UNIT_TEST:
        id: Multiple-4
        expected:
          text: "unitTest(Multiple-4): not('abc klm xyz'.endsWith('123'))"
        arg:
          NOT:
            arg:
              ENDS_WITH:
                arg:
                  TEXT: "abc klm xyz"
                search:
                  TEXT: "123"
  - status: COMPLIANT
    currentStateMessage: Whitespace-1
    check:
      UNIT_TEST:
        id: Whitespace-1
        expected:
          text: "unitTest(Whitespace-1): ' aa   bb  cc '.endsWith('bb cc')"
        arg:
          ENDS_WITH:
            arg:
              TEXT: " aa   bb  cc "
            search:
              TEXT: "bb cc"
  - status: COMPLIANT
    currentStateMessage: Whitespace-2
    check:
      UNIT_TEST:
        id: Whitespace-2
        expected:
          text: "unitTest(Whitespace-2): 'aa bb cc'.endsWith('  bb    cc ')"
        arg:
          ENDS_WITH:
            arg:
              TEXT: "aa bb cc"
            search:
              TEXT: "  bb    cc "
  - status: COMPLIANT
    currentStateMessage: Whitespace-3
    check:
      UNIT_TEST:
        id: Whitespace-3
        expected:
          text: "unitTest(Whitespace-3): ''.endsWith('\\n\\r\\t')"
        arg:
          ENDS_WITH:
            arg:
              TEXT: ""
            search:
              TEXT: "\n\r\t"
  - status: COMPLIANT
    currentStateMessage: Whitespace-4
    check:
      UNIT_TEST:
        id: Whitespace-4
        expected:
          text: "unitTest(Whitespace-4): 'a b c'.endsWith('  a\\n b \\r c \\t')"
        arg:
          ENDS_WITH:
            arg:
              TEXT: "a b c"
            search:
              TEXT: "  a\n b \r c \t"
  - status: COMPLIANT
    currentStateMessage: Case-1
    check:
      UNIT_TEST:
        id: Case-1
        expected:
          text: "unitTest(Case-1): 'ABC KLM XYZ'.endsWith('xyz')"
        arg:
          ENDS_WITH:
            arg:
              TEXT: "ABC KLM XYZ"
            search:
              TEXT: "xyz"
  - status: COMPLIANT
    currentStateMessage: Null-1
    check:
      UNIT_TEST:
        id: Null-1
        expected:
          text: "unitTest(Null-1): null.endsWith(null)"
        arg:
          ENDS_WITH:
            arg:
              UNIT_TEST_NULL:
                returnType: TEXT
            search:
              UNIT_TEST_NULL:
                returnType: TEXT
  - status: COMPLIANT
    currentStateMessage: Null-2
    check:
      UNIT_TEST:
        id: Null-2
        expected:
          text: "unitTest(Null-2): ''.endsWith(null)"
        arg:
          ENDS_WITH:
            arg:
              TEXT: ""
            search:
              UNIT_TEST_NULL:
                returnType: TEXT
  - status: COMPLIANT
    currentStateMessage: Null-3
    check:
      UNIT_TEST:
        id: Null-3
        expected:
          text: "unitTest(Null-3): 'abc'.endsWith(null)"
        arg:
          ENDS_WITH:
            arg:
              TEXT: "abc"
            search:
              UNIT_TEST_NULL:
                returnType: TEXT
  - status: COMPLIANT
    currentStateMessage: Null-4
    check:
      UNIT_TEST:
        id: Null-4
        expected:
          text: "unitTest(Null-4): null.endsWith('')"
        arg:
          ENDS_WITH:
            arg:
              UNIT_TEST_NULL:
                returnType: TEXT
            search:
              TEXT: ""
  - status: COMPLIANT
    currentStateMessage: Null-5
    check:
      UNIT_TEST:
        id: Null-5
        expected:
          text: "unitTest(Null-5): not(null.endsWith('abc'))"
        arg:
          NOT:
            arg:
              ENDS_WITH:
                arg:
                  UNIT_TEST_NULL:
                    returnType: TEXT
                search:
                  TEXT: "abc"
otherwise:
  status: INCOMPLIANT
  currentStateMessage: Test Failed
  remediationMessage: Developer Fix Required