refactor out resteasy from adapters