### Question:
Month extends RegularTimePeriod implements Serializable { @Override public long getLastMillisecond() { return this.lastMillisecond; } Month();  Month(int month, int year);  Month(int month, Year year);  Month(Date time);  Month(Date time, TimeZone zone, Locale locale); Year getYear(); int getYearValue(); int getMonth(); @Override long getFirstMillisecond(); @Override long getLastMillisecond(); @Override void peg(Calendar calendar); @Override RegularTimePeriod previous(); @Override RegularTimePeriod next(); @Override long getSerialIndex(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(TimePeriod o1); @Override long getFirstMillisecond(Calendar calendar); @Override long getLastMillisecond(Calendar calendar); static Month parseMonth(String s);  }### Answer:
@Test public void testGetLastMillisecond() { Locale saved = Locale.getDefault(); Locale.setDefault(Locale.UK); TimeZone savedZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone("Europe/London")); Month m = new Month(3, 1970); assertEquals(7772399999L, m.getLastMillisecond()); Locale.setDefault(saved); TimeZone.setDefault(savedZone); }
@Test public void testGetLastMillisecondWithTimeZone() { Month m = new Month(2, 1950); TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles"); Calendar c = new GregorianCalendar(zone); assertEquals(-626025600001L, m.getLastMillisecond(c)); try { m.getLastMillisecond(null); fail("NullPointerException should have been thrown on null parameter"); } catch (NullPointerException e) { } }
@Test public void testGetLastMillisecondWithCalendar() { Month m = new Month(3, 2001); GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY); calendar.setTimeZone(TimeZone.getTimeZone("Europe/Frankfurt")); assertEquals(986083199999L, m.getLastMillisecond(calendar)); try { m.getLastMillisecond(null); fail("NullPointerException should have been thrown on null parameter"); } catch (NullPointerException e) { } }