@Test public void testUsage() throws Exception { final Format f1 = new SimpleDateFormat("MMddyyyy", Locale.ENGLISH); final Format f2 = new SimpleDateFormat("MMMM d, yyyy", Locale.ENGLISH); final CompositeFormat c = new CompositeFormat(f1, f2); final String testString = "January 3, 2005"; assertEquals(testString, c.format(c.parseObject("01032005"))); assertEquals(testString, c.reformat("01032005")); }