Fixed forbidden method calls in tests