@Test public void testReadFromJsonWithError() { assertThrows(VocabHunterException.class, () -> FileTool.readFromJson(FileToolTestBean.class, subDirectory, ERROR_TEMPLATE)); }
public static <T> T readFromJson(final Class<T> beanClass, final Path file, final String errorTemplate) { try { return MAPPER.readValue(file.toFile(), beanClass); } catch (final IOException e) { throw buildError(file, errorTemplate, e); } }
FileTool { public static <T> T readFromJson(final Class<T> beanClass, final Path file, final String errorTemplate) { try { return MAPPER.readValue(file.toFile(), beanClass); } catch (final IOException e) { throw buildError(file, errorTemplate, e); } } }
FileTool { public static <T> T readFromJson(final Class<T> beanClass, final Path file, final String errorTemplate) { try { return MAPPER.readValue(file.toFile(), beanClass); } catch (final IOException e) { throw buildError(file, errorTemplate, e); } } private  FileTool(); }
FileTool { public static <T> T readFromJson(final Class<T> beanClass, final Path file, final String errorTemplate) { try { return MAPPER.readValue(file.toFile(), beanClass); } catch (final IOException e) { throw buildError(file, errorTemplate, e); } } private  FileTool(); static void ensureDirectoryExists(final Path file, final String errorTemplate); static void writeMinimalJson(final Path file, final String errorTemplate); static void writeAsJson(final Path file, final Object v, final String errorTemplate); static T readFromJson(final Class<T> beanClass, final Path file, final String errorTemplate); }
FileTool { public static <T> T readFromJson(final Class<T> beanClass, final Path file, final String errorTemplate) { try { return MAPPER.readValue(file.toFile(), beanClass); } catch (final IOException e) { throw buildError(file, errorTemplate, e); } } private  FileTool(); static void ensureDirectoryExists(final Path file, final String errorTemplate); static void writeMinimalJson(final Path file, final String errorTemplate); static void writeAsJson(final Path file, final Object v, final String errorTemplate); static T readFromJson(final Class<T> beanClass, final Path file, final String errorTemplate);  }