@@ -0,0 +1,1103 @@
+import static org.junit.Assert.assertEquals;%0A%0Aimport java.io.File;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.net.URL;%0Aimport java.nio.channels.Channels;%0Aimport java.nio.channels.ReadableByteChannel;%0A%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Apublic class ReaderTest %7B%0A%0A%09/**%0A%09 * a sample file, available from Autodesk, in 2007 format%0A%09 */%0A%09static File testFile = new File(%22air_suspension.dwg%22);%0A%0A%09/**%0A%09 * @throws java.lang.Exception%0A%09 */%0A%09@BeforeClass%0A%09public static void setUpBeforeClass() throws Exception %7B%0A%09%09if (!testFile.exists()) %7B%0A%09%09%09URL website = new URL(%22http://download.autodesk.com/us/support/files/autocadlt_2010_sample_files/air_suspension.dwg%22);%0A%09%09%09try (%0A%09%09%09%09%09ReadableByteChannel inputChannel = Channels.newChannel(website.openStream());%0A%09%09%09%09%09FileOutputStream outputStream = new FileOutputStream(testFile);%0A%09%09%09) %7B%0A%09%09%09%09outputStream.getChannel().transferFrom(inputChannel, 0, Long.MAX_VALUE);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%0A%09@Test%0A%09public void version() throws IOException %7B%0A%09%09Reader reader = new Reader(testFile);%0A%09%09assertEquals(%22AC1021%22, reader.getVersion());%0A%09%7D%0A%7D%0A

add first test case