static boolean bypassDocumentValidationNotSupported(
     final Boolean bypassDocumentValidation,
     final WriteConcern writeConcern,
     final ConnectionDescription description) {
   return bypassDocumentValidation != null
       && serverIsAtLeastVersionThreeDotTwo(description)
       && !writeConcern.isAcknowledged();
 }
 static void checkBypassDocumentValidationIsSupported(
     final Connection connection,
     final Boolean bypassDocumentValidation,
     final WriteConcern writeConcern) {
   if (bypassDocumentValidation != null
       && serverIsAtLeastVersionThreeDotTwo(connection.getDescription())
       && !writeConcern.isAcknowledged()) {
     throw new MongoClientException(
         "Specifying bypassDocumentValidation with an unacknowledged WriteConcern is not supported");
   }
 }
 static void validateCollationAndWriteConcern(
     final Connection connection, final Collation collation, final WriteConcern writeConcern) {
   if (!serverIsAtLeastVersionThreeDotFour(connection.getDescription()) && collation != null) {
     throw new IllegalArgumentException(
         format(
             "Collation not supported by server version: %s",
             connection.getDescription().getServerVersion()));
   } else if (collation != null && !writeConcern.isAcknowledged()) {
     throw new MongoClientException(
         "Specifying collation with an unacknowledged WriteConcern is not supported");
   }
 }
 static void checkBypassDocumentValidationIsSupported(
     final AsyncConnection connection,
     final Boolean bypassDocumentValidation,
     final WriteConcern writeConcern,
     final AsyncCallableWithConnection callable) {
   Throwable throwable = null;
   if (bypassDocumentValidation != null
       && serverIsAtLeastVersionThreeDotTwo(connection.getDescription())
       && !writeConcern.isAcknowledged()) {
     throwable =
         new MongoClientException(
             "Specifying bypassDocumentValidation with an unacknowledged WriteConcern is "
                 + "not supported");
   }
   callable.call(connection, throwable);
 }