Replace mock test cases by functional tests.