### Question:
TimeStampKeyGenerator implements IReportKeyGenerator { protected static String format(String pattern, Date currentTime) { return new SimpleDateFormat(pattern,Locale.GERMAN).format(currentTime); } TimeStampKeyGenerator(String pattern); @Override String keyOf(ISerializedObjectTree tree); static IReportKeyGenerator withMilliseconds();  }### Answer:
@Test public void formatedDateShouldContainAllParts() { String key = TimeStampKeyGenerator.format( TimeStampKeyGenerator.DEFAULT_WITH_MILLISECONDS, sampleDate()); assertEquals("1979-03-06--060703-168", key); }