Scala assertions and enumerations