public void handleLoss(String loss) {
        lossHandler.accept(new UnwritableMetadataException(requestedMetadataVersion, loss));
    }
@Test
    public void testDefaultLossHandler() {
        ImageWriterOptions options = new ImageWriterOptions.Builder().build();
        assertEquals("stuff", assertThrows(UnwritableMetadataException.class,
                () -> options.handleLoss("stuff")).loss());
    }