#322 added tests