@Test public void testWriteMinimalJsonSuccess() throws Exception { FileTool.writeMinimalJson(newFile, ERROR_TEMPLATE); List<String> result = Files.readAllLines(newFile); List<String> expected = List.of("{}"); assertEquals(expected, result); }
public static void writeMinimalJson(final Path file, final String errorTemplate) { try { Files.write(file, MINIMAL_JSON); } catch (final IOException e) { throw buildError(file, errorTemplate, e); } }
FileTool { public static void writeMinimalJson(final Path file, final String errorTemplate) { try { Files.write(file, MINIMAL_JSON); } catch (final IOException e) { throw buildError(file, errorTemplate, e); } } }
FileTool { public static void writeMinimalJson(final Path file, final String errorTemplate) { try { Files.write(file, MINIMAL_JSON); } catch (final IOException e) { throw buildError(file, errorTemplate, e); } } private  FileTool(); }
FileTool { public static void writeMinimalJson(final Path file, final String errorTemplate) { try { Files.write(file, MINIMAL_JSON); } 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 void writeMinimalJson(final Path file, final String errorTemplate) { try { Files.write(file, MINIMAL_JSON); } 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);  }