add test for object optimized class