[WO-325] Added more tests

Additionally fixed a bug with decoding non utf-8 text content