@Test
public void shouldCorrectlyWriteDate() {

    Date now = new Date();
    String dateStr = Bson.getDateFormatter().format(now);
    String expected = "{ \"$date\" : \"" + dateStr + "\" }";
    String actual = writer.write(now);
    assertSame(expected, actual);
}