WideFileInputInterpreter { @Nullable @VisibleForTesting static String convertGender(@NotNull String gender) { if (gender.equals("1")) { return "male"; } else if (gender.equals("2")) { return "female"; } else { return null; } } private  WideFileInputInterpreter();   }
@Test public void canConvertGender() { assertEquals("male", WideFileInputInterpreter.convertGender("1")); assertEquals("female", WideFileInputInterpreter.convertGender("2")); assertNull(WideFileInputInterpreter.convertGender("")); }