PersistenceProtoFilesLabeler implements Labeler { public void processProto(final File file) { try { if (file != null && !KOGITO_APPLICATION_PROTO.equalsIgnoreCase(file.getName())) { this.encodedProtos.put(generateKey(file), compressFile(file)); } } catch (IOException e) { throw new UncheckedIOException("Error while processing proto files as image labels", e); } }  void processProto(final File file); @Override Map<String, String> generateLabels(); static final String PROTO_FILE_EXT; }
@Test void testGenerateLabelsIOException() throws URISyntaxException { final PersistenceProtoFilesLabeler labeler = new PersistenceProtoFilesLabeler(); Assertions.assertThrows(UncheckedIOException.class, () -> labeler.processProto(new File("target"))); }