SevntuUtil { public static void reportInvalidToken(int token) { throw new IllegalArgumentException("Found unsupported token: " + TokenUtil.getTokenName(token)); } private  SevntuUtil(); static void reportInvalidToken(int token); static DetailAST getNextSubTreeNode(DetailAST node, DetailAST subTreeRoot);  }
@Test public void testReportInvalidToken() { try { SevntuUtil.reportInvalidToken(TokenTypes.CLASS_DEF); fail("exception expected"); } catch (IllegalArgumentException ex) { Assert.assertEquals("Found unsupported token: CLASS_DEF", ex.getMessage()); } }