Add test. fixes #2