StateReader { public TerraformState read(InputStream in) throws IOException { try(InputStreamReader reader = new InputStreamReader(in, DEFAULT_CHARSET)){ return read(reader); } } StateReader(); TerraformState read(InputStream in); TerraformState read(Reader reader);  }
@Test public void readShouldParseStateJsonCorrectly() throws IOException { StateReader reader = new StateReader(); TerraformState terraformState; try(InputStream in = StateReader.class.getClassLoader().getResourceAsStream("test-state.json")) { terraformState = reader.read(in); } assertThat(terraformState).isNotNull(); assertThat(terraformState.getValues()).isNotNull(); assertThat(terraformState.getValues().getRootModule()).isNotNull(); assertThat(terraformState.getValues().getRootModule().getAddress()).isNull(); }