reduce complexity of mock_cocaine method