Add test to verify unsubscribe on terminate