code: @Override
      public synchronized boolean hasCapability(final String capability) throws MessagingException {
          return capability != null
                  && (capability.toLowerCase().startsWith("IMAP4") || capability.toLowerCase().startsWith("IDLE") || capability.toLowerCase()
                          .startsWith("ID"));
      }
docs: /* (non-Javadoc)
  @see com.sun.mail.imap.IMAPStore#hasCapability(java.lang.String)