Main functionality test.