You can use class tags in this case instead of providing classes explicitly as arguments:

    import scala.reflect.ClassTag
  
    def attributeMustBe[T](expected: java.util.Set[T], attributeName: String)(implicit product: Product, tpe: ClassTag[T]) {
        val clazz = tpe.runtimeClass // this gives java class back
        // ...
    }

and then usage is much more simple:

    attributeMustBe(expected, "setattributedate")