void () { List<MessageFormatUtil.MessageFormatError> errors = MessageFormatUtil.checkQuote("''"); Assert.assertTrue(errors.isEmpty()); errors = MessageFormatUtil.checkQuote("'''"); Assert.assertTrue(errors.isEmpty()); errors = MessageFormatUtil.checkQuote("a'''"); Assert.assertTrue(errors.isEmpty()); errors = MessageFormatUtil.checkQuote("gh.a'''i,,h"); Assert.assertTrue(errors.isEmpty()); errors = MessageFormatUtil.checkQuote("a'''b"); Assert.assertTrue(errors.isEmpty()); errors = MessageFormatUtil.checkQuote("i'''mh"); Assert.assertTrue(errors.isEmpty()); errors = MessageFormatUtil.checkQuote("I'm he's she'll"); Assert.assertTrue(errors.isEmpty()); errors = MessageFormatUtil.checkQuote("I'''m"); Assert.assertEquals(1, errors.size()); MessageFormatUtil.MessageFormatError error = errors.get(0); Assert.assertEquals(MessageFormatUtil.MessageFormatErrorType.MANY_QUOTES, error.errorType()); Assert.assertEquals(1, error.fromIndex()); Assert.assertEquals(4, error.toIndex()); errors = MessageFormatUtil.checkQuote("I'''m. He'''s"); Assert.assertEquals(2, errors.size()); error = errors.get(0); Assert.assertEquals(MessageFormatUtil.MessageFormatErrorType.MANY_QUOTES, error.errorType()); Assert.assertEquals(1, error.fromIndex()); Assert.assertEquals(4, error.toIndex()); error = errors.get(1); Assert.assertEquals(MessageFormatUtil.MessageFormatErrorType.MANY_QUOTES, error.errorType()); Assert.assertEquals(9, error.fromIndex()); Assert.assertEquals(12, error.toIndex()); errors = MessageFormatUtil.checkQuote("df. I'''m. He'''s, ghjg"); Assert.assertEquals(2, errors.size()); error = errors.get(0); Assert.assertEquals(MessageFormatUtil.MessageFormatErrorType.MANY_QUOTES, error.errorType()); Assert.assertEquals(5, error.fromIndex()); Assert.assertEquals(8, error.toIndex()); error = errors.get(1); Assert.assertEquals(MessageFormatUtil.MessageFormatErrorType.MANY_QUOTES, error.errorType()); Assert.assertEquals(13, error.fromIndex()); Assert.assertEquals(16, error.toIndex()); }