### Question:
MailHandler extends Handler { @Override public boolean isLoggable(final LogRecord record) { if (record == null) { return false; } int levelValue = getLevel().intValue(); if (record.getLevel().intValue() < levelValue || levelValue == offValue) { return false; } Filter body = getFilter(); if (body == null || body.isLoggable(record)) { setMatchedPart(-1); return true; } return isAttachmentLoggable(record); } MailHandler();  MailHandler(final int capacity);  MailHandler(final Properties props); @Override boolean isLoggable(final LogRecord record); @Override void publish(final LogRecord record); void postConstruct(); void preDestroy(); void push(); @Override void flush(); @Override void close(); @Override void setLevel(final Level newLevel); @Override Level getLevel(); @Override ErrorManager getErrorManager(); @Override void setErrorManager(final ErrorManager em); @Override Filter getFilter(); @Override void setFilter(final Filter newFilter); @Override synchronized String getEncoding(); @Override void setEncoding(String encoding); @Override synchronized Formatter getFormatter(); @Override synchronized void setFormatter(Formatter newFormatter); final synchronized Level getPushLevel(); final synchronized void setPushLevel(final Level level); final synchronized Filter getPushFilter(); final synchronized void setPushFilter(final Filter filter); final synchronized Comparator<? super LogRecord> getComparator(); final synchronized void setComparator(Comparator<? super LogRecord> c); final synchronized int getCapacity(); final synchronized Authenticator getAuthenticator(); final void setAuthenticator(final Authenticator auth); final void setAuthenticator(final char... password); final void setMailProperties(Properties props); final Properties getMailProperties(); final Filter[] getAttachmentFilters(); final void setAttachmentFilters(Filter... filters); final Formatter[] getAttachmentFormatters(); final void setAttachmentFormatters(Formatter... formatters); final Formatter[] getAttachmentNames(); final void setAttachmentNames(final String... names); final void setAttachmentNames(Formatter... formatters); final synchronized Formatter getSubject(); final void setSubject(final String subject); final void setSubject(final Formatter format);  }### Answer:
@Test public void testIsLoggable() { final Level[] lvls = getAllLevels(); if (lvls.length > 0) { LogRecord record = new LogRecord(Level.INFO, ""); for (Level lvl : lvls) { testLoggable(lvl, null); testLoggable(lvl, record); } } else { fail("No predefined levels."); } }