(test) Added end-to-end test.