public static Attachment fromBinaryBytes( byte[] bytes, MediaType mediaType ) {
        if( !mediaType.isBinary() ) {
            throw new IllegalArgumentException( "MediaType must be binary" );
        }
        return new Attachment(BaseEncoding.base64().encode( bytes ), mediaType, null );
    }
Creates an attachment from a given array of bytes.
The bytes will be Base64 encoded.
@throws java.lang.IllegalArgumentException if mediaType is not binary
jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java