ChordFileReader { @VisibleForTesting @NotNull static ChordStatus extractHrStatus(@NotNull String hrStatus) { switch (hrStatus) { case "cannot_be_determined": return ChordStatus.CANNOT_BE_DETERMINED; case "HR_proficient": return ChordStatus.HR_PROFICIENT; case "HR_deficient": return ChordStatus.HR_DEFICIENT; } LOGGER.warn("Unknown CHORD HR status: '{}'", hrStatus); return ChordStatus.UNKNOWN; } private  ChordFileReader(); @NotNull static ChordAnalysis read(@NotNull String filePath);  }
@Test public void canConvertHRDToStatus() { assertEquals(ChordStatus.CANNOT_BE_DETERMINED, ChordFileReader.extractHrStatus("cannot_be_determined")); assertEquals(ChordStatus.HR_PROFICIENT, ChordFileReader.extractHrStatus("HR_proficient")); assertEquals(ChordStatus.HR_DEFICIENT, ChordFileReader.extractHrStatus("HR_deficient")); assertEquals(ChordStatus.UNKNOWN, ChordFileReader.extractHrStatus("dgdfg")); }