BalanceFileReaderImplV2 implements BalanceFileReader { public boolean isFirstLineFromFileVersion(String firstLine) { return StringUtils.startsWith(firstLine, VERSION_2_HEADER_PREFIX); }  @Override Stream<AccountBalance> read(File file); boolean isFirstLineFromFileVersion(String firstLine);  }
@Test void fileVersion2HeaderConfirmed() { assertThat(balanceFileReader.isFirstLineFromFileVersion(VERSION_2_HEADER_PREFIX)).isTrue(); }
@Test void fileVersion1HeaderIsRejected() { assertThat(balanceFileReader.isFirstLineFromFileVersion(VERSION_1_TIMESTAMP_HEADER_PREFIX)).isFalse(); }
@Test void nullFirstLineIsRejected() { assertThat(balanceFileReader.isFirstLineFromFileVersion(null)).isFalse(); }
@Test void randomFirstLineIsRejected() { assertThat(balanceFileReader.isFirstLineFromFileVersion("junk")).isFalse(); }