@Test
public void testCreateQueryWithBeforeClause() throws NoSuchMethodException, SecurityException {
Method method = SampleRepository.class.getMethod("findByLastModifiedBefore", Date.class);
Query query = createQueryForMethodWithArgs(method, new Object[] { new DateTime(2012, 10, 15, 5, 31, 0,
DateTimeZone.UTC) });
Assert.assertEquals("last_modified:[* TO 2012\\-10\\-15T05\\:31\\:00.000Z}", queryParser.getQueryString(query));
}