adding functional tests for #1399