### Question:
TimeZoneAdjustment implements Cloneable { public static TimeZoneAdjustment parse(String line) throws ParseException { TimeZoneAdjustment result = new TimeZoneAdjustment(); Matcher m = parsePattern.matcher(line); if (!m.matches()) throw new ParseException("not a valid time zone adjustment record", 0); m = numberParsePattern.matcher(line); long adj, offset; while (m.find()) { adj = Long.parseLong(m.group()); m.find(); offset = Long.parseLong(m.group()); result.getAdjustments().add(new Adjustment(adj, offset)); } return result; } TimeZoneAdjustment(); List<Adjustment> getAdjustments(); @Override String toString(); @Override TimeZoneAdjustment clone(); static TimeZoneAdjustment parse(String line);  }### Answer:
@Test public void testParse() throws ParseException { System.out.println("SDP time zone adjustment parse test..."); String[] tzas = new String[] { "z=1 2", "z=1 2 3 4", "z=1\t2\t3\t4", " z=1 2", "z =1 2", "z = 1 2", "z= 1 2", }; int i = 0; TimeZoneAdjustment tza = TimeZoneAdjustment.parse(tzas[i++]); List<TimeZoneAdjustment.Adjustment> adjs = tza.getAdjustments(); assertEquals(1, adjs.size()); assertEquals(1l, adjs.get(0).getAdjustmentTime()); assertEquals(2l, adjs.get(0).getOffest()); for (; i < 3; i++) { tza = TimeZoneAdjustment.parse(tzas[i]); adjs = tza.getAdjustments(); assertEquals(2, adjs.size()); assertEquals(1l, adjs.get(0).getAdjustmentTime()); assertEquals(2l, adjs.get(0).getOffest()); assertEquals(3l, adjs.get(1).getAdjustmentTime()); assertEquals(4l, adjs.get(1).getOffest()); } for (; i < tzas.length; i++) { try { TimeZoneAdjustment.parse(tzas[i]); fail("time zone adjustment: \"" + tzas[i] + "\" parsed without an exception"); } catch (ParseException ex) { } } }