Suppress false positives by adding the suppression annotation @SuppressWarnings("MockIllegalThrows") to the enclosing element.
@SuppressWarnings("MockIllegalThrows")