unit tests for done call