public static Collection<MdbValidityStatus> assertEjbClassValidity(final ClassInfo mdbClass) {
        Collection<MdbValidityStatus> mdbComplianceIssueList = new ArrayList<>(MdbValidityStatus.values().length);
        final String className = mdbClass.name().toString();
        verifyModifiers(className, mdbClass.flags(), mdbComplianceIssueList);
        for (MethodInfo method : mdbClass.methods()) {
            if ("onMessage".equals(method.name())) {
                verifyOnMessageMethod(className, method.flags(), mdbComplianceIssueList);
            }

            if ("finalize".equals(method.name())) {
                EjbLogger.DEPLOYMENT_LOGGER.mdbCantHaveFinalizeMethod(className);
                mdbComplianceIssueList.add(MdbValidityStatus.MDB_SHOULD_NOT_HAVE_FINALIZE_METHOD);
            }
        }
        return mdbComplianceIssueList;
    }
@Test
    public void mdbWithFinalOnMessageMethod() {
        assertTrue(assertEjbClassValidity(buildClassInfoForClass(InvalidMdbOnMessageCantBeFinal.class.getName())).contains(
                MdbValidityStatus.MDB_ON_MESSAGE_METHOD_CANT_BE_FINAL));
    }