move around code in tests, add failing test for simple query