add a test checking validity of different class types.