pvm.put(PROP2, dateValue2);
pvm.put(PROP3, calendarValue3);
getSession().save();
// read with property map
final ValueMap vm = new JcrModifiableValueMap(testNode, null);
assertEquals(dateValue1, vm.get(PROP1, Date.class));
assertEquals(calendarValue1, vm.get(PROP1, Calendar.class));
assertEquals(dateValue2, vm.get(PROP2, Date.class));
assertEquals(calendarValue2, vm.get(PROP2, Calendar.class));
assertEquals(dateValue3, vm.get(PROP3, Date.class));
assertEquals(calendarValue3, vm.get(PROP3, Calendar.class));
// check types
assertTrue(vm.get(PROP1) instanceof Calendar);
assertTrue(vm.get(PROP2) instanceof InputStream);
assertTrue(vm.get(PROP3) instanceof Calendar);
// read properties
assertEquals(calendarValue1, testNode.getProperty(PROP1).getDate());
assertEquals(calendarValue3, testNode.getProperty(PROP3).getDate());