Test cases for determineOperation