add scala companion obejct test case