added tests for before processing a disconnect