Cumulative Sum Tests: Theory and Practice