Write a basic function to manipulate a specific data structure and suggest comprehensive test cases for it.