@Override
@Test
public void shouldCorrectlyWriteBsonObjectWithNestedObjectValue() {

    writer = new PrettyJsonWriter();
    BasicDocument address = new BasicDocument();
    address.put("street", "100 Main St.");
    address.put("city", "Springfield");
    BasicDocument top = new BasicDocument();
    top.put("firstName", "Jack");
    top.put("lastName", "Riley");
    top.put("address", address);
    String actual = writer.write(top);
    String expected = "{\n  \"firstName\" : \"Jack\",\n  \"lastName\" : \"Riley\",\n  \"address\" : {\n    \"street\" : \"100 Main St.\",\n    \"city\" : \"Springfield\"\n  }\n}";
    assertSame(expected, actual);
}