Unit tests aligned with https://github.com/torakiki/sejda/issues/150