Fixes broken testfile and adds a testcase.