@Test
public void should_create_date_criteria()
{
// given
final String name = "should_create_date_criteria";
final Simple simple = new Simple(name);
simple.setTemporal(new Date());
entityManager.persist(simple);
entityManager.flush();
Calendar cal = Calendar.getInstance();
cal.setTime(simple.getTemporal());
cal.add(Calendar.MINUTE, -1);
Date from = cal.getTime();
cal.add(Calendar.MINUTE, 2);
Date to = cal.getTime();