@Test
public void testParse() throws Exception {

    TimestampValidator ts = new TimestampValidator(false);
    assertNotNull(ts.parseTimestamp("2015-01-15 11:10:20.333"));
    assertNotNull(ts.parseTimestamp("2015-01-15 11:10:20"));
    try {
        ts.parseTimestamp("2015-01-15");
        fail();
    } catch (IllegalArgumentException e) {
        // good
    }
}