@Test
public void testParseInvalidInput() {

    // missing field
    assertNull(parseHttpDate("Sun, Nov 1994 08:49:37 GMT"));
    assertNull(parseHttpDate("Sun, 6 1994 08:49:37 GMT"));
    assertNull(parseHttpDate("Sun, 6 Nov 08:49:37 GMT"));
    assertNull(parseHttpDate("Sun, 6 Nov 1994 :49:37 GMT"));
    assertNull(parseHttpDate("Sun, 6 Nov 1994 49:37 GMT"));
    assertNull(parseHttpDate("Sun, 6 Nov 1994 08::37 GMT"));
    assertNull(parseHttpDate("Sun, 6 Nov 1994 08:37 GMT"));
    assertNull(parseHttpDate("Sun, 6 Nov 1994 08:49: GMT"));
    assertNull(parseHttpDate("Sun, 6 Nov 1994 08:49 GMT"));
    //invalid value
    assertNull(parseHttpDate("Sun, 6 FOO 1994 08:49:37 GMT"));
    assertNull(parseHttpDate("Sun, 36 Nov 1994 08:49:37 GMT"));
    assertNull(parseHttpDate("Sun, 6 Nov 1994 28:49:37 GMT"));
    assertNull(parseHttpDate("Sun, 6 Nov 1994 08:69:37 GMT"));
    assertNull(parseHttpDate("Sun, 6 Nov 1994 08:49:67 GMT"));
    //wrong number of digits in timestamp
    assertNull(parseHttpDate("Sunday, 6 Nov 1994 0:0:000 GMT"));
    assertNull(parseHttpDate("Sunday, 6 Nov 1994 0:000:0 GMT"));
    assertNull(parseHttpDate("Sunday, 6 Nov 1994 000:0:0 GMT"));
}