### Question:
LoaderUtils { public static PutCall parsePutCall(String str) { switch (str.toUpperCase(Locale.ENGLISH)) { case "PUT": case "P": return PutCall.PUT; case "CALL": case "C": return PutCall.CALL; default: throw new IllegalArgumentException( "Unknown PutCall value, must be 'Put' or 'Call' but was '" + str + "'; " + "parser is case insensitive and also accepts 'P' and 'C'"); } } private  LoaderUtils(); static Index findIndex(String reference); static boolean parseBoolean(String str); static int parseInteger(String str); static double parseDouble(String str); static double parseDoublePercent(String str); static BigDecimal parseBigDecimal(String str); static BigDecimal parseBigDecimalPercent(String str); static LocalDate parseDate(String str, DateTimeFormatter... formatters); static LocalDate parseDate(String str); static YearMonth parseYearMonth(String str); static LocalTime parseTime(String str); static ZoneId parseZoneId(String str); static Period parsePeriod(String str); static Tenor parseTenor(String str); static Optional<Tenor> tryParseTenor(String str); static Frequency parseFrequency(String str); static Currency parseCurrency(String str); static Optional<Currency> tryParseCurrency(String str); static DayCount parseDayCount(String str); static BusinessDayConvention parseBusinessDayConvention(String str); static RollConvention parseRollConvention(String str); static BuySell parseBuySell(String str); static PayReceive parsePayReceive(String str); static PutCall parsePutCall(String str); static LongShort parseLongShort(String str); static final String DEFAULT_TRADE_SCHEME; static final String DEFAULT_POSITION_SCHEME; static final String DEFAULT_SECURITY_SCHEME; }### Answer:
@Test public void test_parsePutCall() { assertThat(LoaderUtils.parsePutCall("PUT")).isEqualTo(PutCall.PUT); assertThat(LoaderUtils.parsePutCall("Put")).isEqualTo(PutCall.PUT); assertThat(LoaderUtils.parsePutCall("put")).isEqualTo(PutCall.PUT); assertThat(LoaderUtils.parsePutCall("p")).isEqualTo(PutCall.PUT); assertThat(LoaderUtils.parsePutCall("CALL")).isEqualTo(PutCall.CALL); assertThat(LoaderUtils.parsePutCall("Call")).isEqualTo(PutCall.CALL); assertThat(LoaderUtils.parsePutCall("call")).isEqualTo(PutCall.CALL); assertThat(LoaderUtils.parsePutCall("c")).isEqualTo(PutCall.CALL); assertThatIllegalArgumentException().isThrownBy(() -> LoaderUtils.parsePutCall("Rubbish")); }