src/test/java/edu/ucla/library/bucketeer/converters/KakaduConverterTest.java
@Test
    public final void testConvert() throws IOException, InterruptedException {
        if (ConverterFactory.hasSystemKakadu()) {
            final KakaduConverter converter = (KakaduConverter) ConverterFactory.getConverter();
            final File jpx = new File(TMP_DIR, myUUID + ".jpx");

            try {
                converter.convert(myUUID, myTIFF, Conversion.LOSSLESS);

                // Check that the JP2 exists and that it's not an empty file
                assertTrue(jpx.exists());
                assertTrue(jpx.length() > 30000);
            } finally {
                jpx.delete();
            }
        } else {
            LOGGER.warn(MessageCodes.BUCKETEER_003);
            assumeTrue(false); // Ignore this test
        }
    }
/**
     * Tests being able to convert to JP2. This depends on Kakadu being installed, so the test is skipped if that isn't
     * the case.
     *
     * @throws IOException If there is trouble reading the image
     * @throws InterruptedException If the process gets interrupted
     */
Tests being able to convert to JP2. This depends on Kakadu being installed, so the test is skipped if that isn't
the case.

@throws IOException If there is trouble reading the image
@throws InterruptedException If the process gets interrupted
Tests being able to convert to JP2 . This depends on Kakadu being installed so the test is skipped if that isn ' t the case . @throws IOException If there is trouble reading the image @throws InterruptedException If the process gets interrupted
@Test
    public final void testConvert() throws IOException, InterruptedException {
        if (ConverterFactory.hasSystemKakadu()) {
            final KakaduConverter converter = (KakaduConverter) ConverterFactory.getConverter();
            final File jpx = new File(TMP_DIR, myUUID + ".jpx");
            try {
                converter.convert(myUUID, myTIFF, Conversion.LOSSLESS);
                assertTrue(jpx.exists());
                assertTrue(jpx.length() > 30000);
            } finally {
                jpx.delete();
            }
        } else {
            LOGGER.warn(MessageCodes.BUCKETEER_003);
            assumeTrue(false); 
        }
    }
@ Test public final void testConvert ( ) throws IOException , InterruptedException { if ( ConverterFactory . hasSystemKakadu ( ) ) { final KakaduConverter converter = ( KakaduConverter ) ConverterFactory . getConverter ( ) ; final File jpx = new File ( TMP_DIR , myUUID + ".jpx" ) ; try { converter . convert ( myUUID , myTIFF , Conversion . LOSSLESS ) ; assertTrue ( jpx . exists ( ) ) ; assertTrue ( jpx . length ( ) > 30000 ) ; } finally { jpx . delete ( ) ; } } else { LOGGER . warn ( MessageCodes . BUCKETEER_003 ) ; assumeTrue ( false ) ; } }
Tests being able to convert to JP2.
Tests being able to convert to JP2 .
// Check that the JP2 exists and that it's not an empty file // Ignore this test