SmithyBuildConfig implements ToSmithyBuilder<SmithyBuildConfig> { public static SmithyBuildConfig load(Path file) { return builder().load(file).build(); } private  SmithyBuildConfig(Builder builder); static Builder builder(); static SmithyBuildConfig load(Path file); @Override Builder toBuilder(); String getVersion(); List<String> getImports(); Optional<String> getOutputDirectory(); Map<String, ProjectionConfig> getProjections(); Map<String, ObjectNode> getPlugins();  }
@Test public void loadsFromJson() { SmithyBuildConfig.load(Paths.get(getResourcePath("special-syntax.json"))); }
@Test public void throwsWithCorrectSyntaxErrorMessage() { Exception thrown = Assertions.assertThrows(SmithyBuildException.class, () -> { SmithyBuildConfig.load(Paths.get(getResourcePath("bad-syntax.json"))); }); assertThat(thrown.getMessage(), containsString("Error parsing")); }
@Test public void requiresVersion() { Exception thrown = Assertions.assertThrows(SourceException.class, () -> { SmithyBuildConfig.load(Paths.get(getResourcePath("missing-version.json"))); }); assertThat(thrown.getMessage(), containsString("version")); }
@Test public void throwsForUnknownEnvironmentVariables() { Assertions.assertThrows(SmithyBuildException.class, () -> { SmithyBuildConfig.load(Paths.get(getResourcePath("config-with-invalid-env.json"))); }); }