@Test
public void testUnsupportedNode() {

    final DetailAstImpl sync = new DetailAstImpl();
    sync.setType(TokenTypes.LITERAL_SYNCHRONIZED);
    try {
        final RequireFailForTryCatchInJunitCheck check =
                new RequireFailForTryCatchInJunitCheck();
        check.visitToken(sync);
        fail("exception expected");
    }
    catch (IllegalArgumentException ex) {
        Assert.assertEquals("Found unsupported token: LITERAL_SYNCHRONIZED", ex.getMessage());
    }
}