### Question:
ThreeLetterTimeZoneID extends BugChecker implements MethodInvocationTreeMatcher { static Replacement getReplacement(String id, boolean inJodaTimeContext) { switch (id) { case "EST": return handleNonDaylightSavingsZone(inJodaTimeContext, "America/New_York", "Etc/GMT+5"); case "HST": return handleNonDaylightSavingsZone(inJodaTimeContext, "Pacific/Honolulu", "Etc/GMT+10"); case "MST": return handleNonDaylightSavingsZone(inJodaTimeContext, "America/Denver", "Etc/GMT+7"); default: } String zoneIdReplacement = ZoneId.SHORT_IDS.get(id); if (zoneIdReplacement == null) { return Replacement.NO_REPLACEMENT; } if (id.endsWith("ST")) { TimeZone timeZone = TimeZone.getTimeZone(id); if (timeZone.observesDaylightTime()) { long hours = Duration.ofMillis(timeZone.getRawOffset()).toHours(); long millis = Duration.ofHours(hours).toMillis(); if (millis == timeZone.getRawOffset()) { String fixedOffset = String.format("Etc/GMT%+d", -hours); String newDescription = SUMMARY + "\n\n" + observesDaylightSavingsMessage("TimeZone", zoneIdReplacement, fixedOffset); return new Replacement(newDescription, ImmutableList.of(zoneIdReplacement, fixedOffset)); } } } return new Replacement(SUMMARY, ImmutableList.of(zoneIdReplacement)); }  @Override Description matchMethodInvocation(MethodInvocationTree tree, final VisitorState state);  }### Answer:
@Test @Ignore public void printMappings() { for (String id : TimeZone.getAvailableIDs()) { if (id.length() == 3) { System.out.printf( "%s %s %s%n", id, ThreeLetterTimeZoneID.getReplacement(id, false).replacements, ThreeLetterTimeZoneID.getReplacement(id, true).replacements); } } }
@Test public void testReplacements_PST() { List<String> replacements = ThreeLetterTimeZoneID.getReplacement("PST", false).replacements; assertThat(replacements).containsExactly("America/Los_Angeles", "Etc/GMT+8").inOrder(); }
@Test public void testReplacements_EST() { List<String> replacements = ThreeLetterTimeZoneID.getReplacement("EST", false).replacements; assertThat(replacements).containsExactly("Etc/GMT+5", "America/New_York").inOrder(); }
@Test public void testReplacements_IST() { List<String> replacements = ThreeLetterTimeZoneID.getReplacement("IST", false).replacements; assertThat(replacements).containsExactly("Asia/Kolkata").inOrder(); }
@Test public void testReplacements_CST() { List<String> replacements = ThreeLetterTimeZoneID.getReplacement("CST", false).replacements; assertThat(replacements).contains("America/Chicago"); assertThat(replacements).doesNotContain("Asia/Shanghai"); }