BSONObject read = BSON.decode( BSON.encode( o ) );
assertEquals( "horowitz" , read.get( "eliot" ).toString() );
assertEquals( 517 , ((Integer)read.get( "num" )).intValue() );
assertEquals( "y" , read.get( "z" ).toString() );
assertEquals( o.keySet().size() , read.keySet().size() );
assertEquals( 3 , a.size() );
assertEquals( a.size() , ((List)read.get( "a" ) ).size() );
assertEquals( "A" , ((List)read.get( "a" ) ).get( 0 ).toString() );
assertEquals( "B" , ((List)read.get( "a" ) ).get( 1 ).toString() );
assertEquals( "C" , ((List)read.get( "a" ) ).get( 2 ).toString() );