@@ -0,0 +1,1131 @@
+/*%0A * Copyright (C) 2014 Klaus Reimer %3Ck@ailis.de%3E%0A * See LICENSE.md for licensing information.%0A */%0A%0Apackage org.usb4java;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.Test;%0A%0A/**%0A * Tests the %7B@link LibUsbException%7D class.%0A * %0A * @author Klaus Reimer (k@ailis.de)%0A */%0Apublic class LibUsbExceptionTest%0A%7B%0A    /**%0A     * Tests the constructor with only an error code.%0A     */%0A    @Test%0A    public void testConstructorWithCode()%0A    %7B%0A        final LibUsbException e =%0A            new LibUsbException(LibUsb.ERROR_INVALID_PARAM);%0A        assertEquals(LibUsb.ERROR_INVALID_PARAM, e.getErrorCode());%0A        assertEquals(%22USB error 2: Invalid parameter%22, e.getMessage());%0A%0A    %7D%0A%0A    /**%0A     * Tests the constructor with an error code and a message.%0A     */%0A    @Test%0A    public void testConstructorWithCodeAndMessage()%0A    %7B%0A        final LibUsbException e =%0A            new LibUsbException(%22Custom message%22, LibUsb.ERROR_INVALID_PARAM);%0A        assertEquals(LibUsb.ERROR_INVALID_PARAM, e.getErrorCode());%0A        assertEquals(%22USB error 2: Custom message: Invalid parameter%22, %0A            e.getMessage());%0A%0A    %7D%0A%7D%0A

Add unit test for LibUsbException class.