### Question:
DefaultPeriodDuration extends DefaultDuration implements PeriodDuration { @Override public long getTimeInMillis() { String periodDescription = this.toString(); long response = 0; periodDescription = periodDescription.substring(1); if (periodDescription.indexOf('Y') != -1) { int nbYear = Integer.parseInt(periodDescription.substring(0, periodDescription.indexOf('Y'))); response += nbYear * YEAR_MS; periodDescription = periodDescription.substring(periodDescription.indexOf('Y') + 1); } if ((periodDescription.indexOf('M') != -1 && (periodDescription.indexOf('T') == -1)) || ((periodDescription.indexOf('T') != -1) && (periodDescription.indexOf('M') < periodDescription.indexOf('T')) && ((periodDescription.indexOf('M') != -1)))) { int nbMonth = Integer.parseInt(periodDescription.substring(0, periodDescription.indexOf('M'))); response += nbMonth * MONTH_MS; periodDescription = periodDescription.substring(periodDescription.indexOf('M') + 1); } if (periodDescription.indexOf('W') != -1) { int nbWeek = Integer.parseInt(periodDescription.substring(0, periodDescription.indexOf('W'))); response += nbWeek * WEEK_MS; periodDescription = periodDescription.substring(periodDescription.indexOf('W') + 1); } if (periodDescription.indexOf('D') != -1) { int nbDay = Integer.parseInt(periodDescription.substring(0, periodDescription.indexOf('D'))); response += nbDay * DAY_MS; periodDescription = periodDescription.substring(periodDescription.indexOf('D') + 1); } if (periodDescription.indexOf('T') != -1) { periodDescription = periodDescription.substring(1); } if (periodDescription.indexOf('H') != -1) { int nbHour = Integer.parseInt(periodDescription.substring(0, periodDescription.indexOf('H'))); response += nbHour * HOUR_MS; periodDescription = periodDescription.substring(periodDescription.indexOf('H') + 1); } if (periodDescription.indexOf('M') != -1) { int nbMin = Integer.parseInt(periodDescription.substring(0, periodDescription.indexOf('M'))); response += nbMin * MINUTE_MS; periodDescription = periodDescription.substring(periodDescription.indexOf('M') + 1); } if (periodDescription.indexOf('S') != -1) { int nbSec = Integer.parseInt(periodDescription.substring(0, periodDescription.indexOf('S'))); response += nbSec * SECOND_MS; periodDescription = periodDescription.substring(periodDescription.indexOf('S') + 1); } if (periodDescription.length() != 0) { throw new IllegalArgumentException("The period duration string is malformed"); } return response; } DefaultPeriodDuration(final InternationalString years, final InternationalString months, final InternationalString weeks, final InternationalString days,
            final InternationalString hours, final InternationalString minutes, final InternationalString seconds);  DefaultPeriodDuration(long durationInMilliSeconds); @Override InternationalString getDesignator(); @Override InternationalString getYears(); @Override InternationalString getMonths(); @Override InternationalString getDays(); @Override InternationalString getTimeIndicator(); @Override InternationalString getHours(); @Override InternationalString getMinutes(); @Override InternationalString getSeconds(); InternationalString getWeek(); @Override long getTimeInMillis(); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testGetTimeInMillis() { long result = ((DefaultPeriodDuration) periodDuration1).getTimeInMillis(); assertFalse(((DefaultPeriodDuration) periodDuration2).getTimeInMillis() == result); }