Removing marshalling test framework and fixing tests (cherry picked from commit b7508925cfa97a92df5e0e9682e097cea7ef85da)