Added TODO for logging error
Fixed test to expect encoding of data