WideFileInputInterpreter { @Nullable static Boolean convertParticipatesInOtherTrials(@NotNull String participatesInOtherTrials) { if (participatesInOtherTrials.equals("Y")) { return true; } else if (participatesInOtherTrials.equals("N")) { return false; } else { return null; } } private  WideFileInputInterpreter();   }
@Test public void canConvertParticipatesInOtherTrials() { assertTrue(WideFileInputInterpreter.convertParticipatesInOtherTrials("Y")); assertFalse(WideFileInputInterpreter.convertParticipatesInOtherTrials("N")); assertNull(WideFileInputInterpreter.convertParticipatesInOtherTrials("")); }