Simplify the test. Make methods private that are only used in tests