@ParameterizedTest
    @MethodSource("data")
    void testOddOffsets(final File imageFile) throws Exception {
        Debug.debug("imageFile", imageFile.getAbsoluteFile());

        final File tempFile = Files.createTempFile("test", ".jpg").toFile();
        Debug.debug("tempFile", tempFile.getAbsoluteFile());

        try {
            final boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
            if (ignoreImageData) {
                return;
            }
            new WriteExifMetadataExample().changeExifMetadata(imageFile, tempFile);
            final JpegImageParser parser = new JpegImageParser();
            final ByteSource byteSource = ByteSource.file(tempFile);
            final TiffImageMetadata tiff = parser.getExifMetadata(byteSource, null);
            for (final TiffField tiffField : tiff.getAllFields()) {
                if (!tiffField.isLocalValue()) {
                    final boolean isOdd = (tiffField.getOffset() & 1L) == 0;
                    assertTrue(isOdd);
                }
            }
        } catch (final ImagingOverflowException e) {
            Debug.debug("Ignoring unavoidable ExifOverflowException: " + e.getMessage());
            Debug.debug("Error image: " + imageFile.getAbsoluteFile());
        }
    }
Test that there are no odd offsets in the generated TIFF images.

@throws Exception if the test failed for a unexpected reason
src/test/java/org/apache/commons/imaging/formats/jpeg/exif/WriteExifMetadataExampleTest.java