Add integration test for #5267