Stubbing out unit tests String escaping