Testing a Construct in scala