317N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 317N/A * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. 317N/A * The contents of this file are subject to the terms of either the GNU 317N/A * General Public License Version 2 only ("GPL") or the Common Development 317N/A * and Distribution License("CDDL") (collectively, the "License"). You 317N/A * may not use this file except in compliance with the License. You can 317N/A * obtain a copy of the License at 317N/A * language governing permissions and limitations under the License. 317N/A * When distributing the software, include this License Header Notice in each 317N/A * GPL Classpath Exception: 317N/A * Oracle designates this particular file as subject to the "Classpath" 317N/A * exception as provided by Oracle in the GPL Version 2 section of the License 317N/A * file that accompanied this code. 317N/A * If applicable, add the following below the License Header, with the fields 317N/A * enclosed by brackets [] replaced by your own identifying information: 317N/A * "Portions Copyright [year] [name of copyright owner]" 317N/A * If you wish your version of this file to be governed by only the CDDL or 317N/A * only the GPL Version 2, indicate your decision by adding "[Contributor] 317N/A * elects to include this software in this distribution under the [CDDL or GPL 317N/A * Version 2] license." If you don't indicate a single choice of license, a 317N/A * recipient has the option to distribute your version of this file under 317N/A * either the CDDL, the GPL Version 2 or to extend the choice of license to 317N/A * its licensees as provided above. However, if you add GPL Version 2 code 317N/A * and therefore, elected the GPL Version 2 license, then the option applies 317N/A * only if the new code is made subject to such option by the copyright 317N/A * Test the MIME multipart messages are parsed correctly and the 317N/A * correct preamble is returned no matter what line terminators 317N/A * are used. This test found some bugs in the way LineInputStream 317N/A * handled different line terminators. 317N/A * @author trejkaz@kenai.com 317N/A "From: user1@example.com\n" +
317N/A "To: user2@example.com\n" +
317N/A "Subject: Receipts\n" +
317N/A "Date: Wed, 14 Jul 2010 19:25:30 +1000\n" +
317N/A "MIME-Version: 1.0\n" +
317N/A "This is a multi-part message in MIME format.\n" +
317N/A "------=_NextPart_000_001C_01CB238A.52E35400\n" +
317N/A "Content-Transfer-Encoding: 7bit\n" +
317N/A "------=_NextPart_000_001C_01CB238A.52E35400\n" +
317N/A "Content-Transfer-Encoding: base64\n" +
317N/A "Content-Disposition: attachment;filename=\"Receipt 1.pdf\"\n" +
317N/A "JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29k\n" +
317N/A "------=_NextPart_000_001C_01CB238A.52E35400\n" +
317N/A "Content-Transfer-Encoding: base64\n" +
317N/A "Content-Disposition: attachment;filename=\"Receipt 2.pdf\"\n" +
317N/A "JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29k\n" +
317N/A "------=_NextPart_000_001C_01CB238A.52E35400--\n" +
317N/A * Performs a check that the multipart of the email was handled correctly. 317N/A * @param text the email text. 317N/A * @throws Exception if an error occurs. 317N/A "This is a multi-part message in MIME format.",