add a more complicated test case from issue 3 and add some assertions to make it easier to know when you're calling the wrong API functions