Test code in scala