### Question:
DefaultPacificDateTimeParser implements SingleLineValueParser<ZonedDateTime> { @Override public ZonedDateTime parse(final String... columns) { checkNotNull(columns, "No columns to parse from"); checkArgument(columns.length == 1, String.format("Expecting only one column, but got %d", columns.length)); final String time = columns[0]; checkArgument(!isNullOrEmpty(time), "Missing time info to parse from"); LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern(pattern, Locale.ENGLISH)); return ZonedDateTime.of(localDateTime, ZoneId.of("America/Los_Angeles")); } DefaultPacificDateTimeParser(final String pattern); @Override ZonedDateTime parse(final String... columns);  }### Answer:
@Test public void testParseFromZendeskTicketType() { DefaultPacificDateTimeParser parser = new DefaultPacificDateTimeParser(ZendeskTicket.TIME_PATTERN); ZonedDateTime pst = parser.parse("Apr 10, 2017 7:56:04 PM"); assertEquals(2017, pst.getYear()); assertEquals(Month.APRIL, pst.getMonth()); assertEquals(10, pst.getDayOfMonth()); assertEquals(19, pst.getHour()); assertEquals(ZoneId.of("America/Los_Angeles"), pst.getZone()); }
@Test public void testParseFromGameLogType() { DefaultPacificDateTimeParser parser = new DefaultPacificDateTimeParser(GameLog.TIME_PATTERN); ZonedDateTime pst = parser.parse("2014 11-02 04:34:16"); assertEquals(2014, pst.getYear()); assertEquals(ZoneId.of("America/Los_Angeles"), pst.getZone()); assertEquals(ZoneOffset.ofHours(-8), pst.getOffset()); ZonedDateTime pdt = parser.parse("2014 10-17 05:38:27"); assertEquals(2014, pdt.getYear()); assertEquals(ZoneId.of("America/Los_Angeles"), pdt.getZone()); assertEquals(ZoneOffset.ofHours(-7), pdt.getOffset()); }
@Test(expected = DateTimeParseException.class) public void testParseFromInvalid() { PARSER.parse("asdfg"); }
@Test(expected = IllegalArgumentException.class) public void testParseFromBlank() { PARSER.parse(""); }
@Test(expected = IllegalArgumentException.class) public void testParseFromNull() { PARSER.parse(); }