Finalize test cases and implementation.