Test for case classes inside List and Map