ConstructorWithoutParamsCheck extends AbstractCheck { @Override public int[] getAcceptableTokens() { return getDefaultTokens(); }  void setClassNameFormat(String classNameFormat); void setIgnoredClassNameFormat(String ignoredClassNameFormat); @Override int[] getDefaultTokens(); @Override int[] getRequiredTokens(); @Override int[] getAcceptableTokens(); @Override void visitToken(DetailAST ast); static final String MSG_KEY; }
@Test public void testGetAcceptableTokens() { final ConstructorWithoutParamsCheck check = new ConstructorWithoutParamsCheck(); final int[] expectedAcceptableTokens = {TokenTypes.LITERAL_NEW}; assertArrayEquals("invalid tokens", expectedAcceptableTokens, check.getAcceptableTokens()); }