Add tests for finish callback