move tests to own package; extract Context test setup