Add tests for #381