@Test
public void testUnescapeMessagePattern() throws ResourceFilterException {

    for (String[] testCase : MESSAGE_PATTERN_TEST_CASES) {
        String result = JavaPropertiesResource.unescapeMessagePattern(testCase[1], MessagePatternEscape.AUTO);
        String expected = testCase.length >= 4 && testCase[3] != null ? testCase[3] : testCase[0];
        assertEquals("unescapeMessagePattern(" + testCase[1] + ", AUTO)", expected, result);
    }
    for (String[] testCase : MESSAGE_PATTERN_TEST_CASES) {
        String input = testCase.length >= 3 && testCase[2] != null ? testCase[2] : testCase[1];
        String result = JavaPropertiesResource.unescapeMessagePattern(input, MessagePatternEscape.ALL);
        String expected = testCase.length >= 5 && testCase[4] != null ? testCase[4] : testCase[0];
        assertEquals("unescapeMessagePattern(" + input + ", ALL)", expected, result);
    }
}