adding new test, fixed buggy test, made several changes for Scwala compatibility