@Test public void testGetFirstDayofMonth() throws ParseException { Date firstDay = DateUtils.getFirstDayofMonth(sdf.parse("2011-10-05")); Assert.assertEquals("2011-10-01", sdf.format(firstDay)); }