A trait to test object decomposition in scala