Add tests for the collapsing and broadcast functionality.