@Test
public void testUpdate_checkDates() throws Exception {
RabbitView view = new RabbitView();
view.createPartControl(shell);
Preference pref = getPreference(view);
Calendar fromDate = new GregorianCalendar(1999, 1, 1);
pref.getStartDate().setTimeInMillis(fromDate.getTimeInMillis());
Calendar toDate = new GregorianCalendar(2010, 1, 1);
pref.getEndDate().setTimeInMillis(toDate.getTimeInMillis());
update(view);
assertEquals(fromDate.get(Calendar.YEAR), pref.getStartDate().get(
Calendar.YEAR));
assertEquals(fromDate.get(Calendar.MONTH), pref.getStartDate().get(
Calendar.MONTH));
assertEquals(fromDate.get(Calendar.DAY_OF_MONTH), pref.getStartDate().get(
Calendar.DAY_OF_MONTH));
assertEquals(toDate.get(Calendar.YEAR), pref.getEndDate()
.get(Calendar.YEAR));
assertEquals(toDate.get(Calendar.MONTH), pref.getEndDate().get(
Calendar.MONTH));
assertEquals(toDate.get(Calendar.DAY_OF_MONTH), pref.getEndDate().get(
Calendar.DAY_OF_MONTH));
}