 the given enumKind descriptor
   */
  def testEnum[EntryType <: ValueEnumEntry[ValueType], ValueType](
      enumKind: String,
      enum: ValueEnum[ValueType, EntryType],
      invalidValues: Seq[ValueType]
  ): Unit = {

    describe(enumKind) {

      it("should have more than one value (sanity test)") {
        enum.values.size should be > 0
      }

      describe("withValue") {

        it("should return entries that match the value") {
          enum.values.foreach { entry =>
            enum.withValue(entry.value) shouldBe entry
          }
        }

        it("should throw on values that don't map to any entries") {
          invalidValues.foreach { invalid =>
            intercept[NoSuchElementException] {
              enum.withValue(invalid)
            }
          }
        }

      }

      describe("withValueOpt") {

        it("should return Some(entry) that match the value") {
          enum.values.foreach { entry =>
            enum.withValueOpt(entry.value) shouldBe Some(entry)
          }
        }

        it("should return None when given values that do not map to any entries") {
          invalidValues.foreach { invalid =>
            enum.withValueOpt(invalid) shouldBe None
          }
        }

      }

      describe("withValueEither") {

        it("should return Right(entry) that match the value") {
          enum.values.foreach { entry =>
            enum.withValueEither(entry.value) shouldBe Right(entry)
          }
        }

        it("should return Left when given values that do not map to any entries") {
          invalidValues.foreach { invalid =>
            enum.withValueEither(invalid) shouldBe Left(NoSuchMember(invalid, enum.values))
          }
        }

      }

      describe("in") {

        it("should return false if given an empty list") {
          enum.values.foreach { entry =>
            entry.in(Nil) shouldBe false
          }
        }

        it("should return false if given a list that does not hold the entry") {
          enum
the given enumKind descriptor 
    * / 
   def testEnum[EntryType <: ValueEnumEntry[ValueType ], ValueType ] (
       enumKind: String, 
       enum: ValueEnum[ValueType, EntryType ], 
       invalidValues: Seq[ValueType ] 
   ): Unit = { 

     describe(enumKind) { 

       it("should have more than one value (sanity trial) ") { 
         enum.values.size should be > 0 
       } 

       describe("withValue ") { 

         it("should reelect entries that pit the value ") { 
           enum.values.foreach { submission = > 
             enum.withValue(entry.value) shouldBe entry 
           } 
         } 

         it("should throw on value that don't map to any submission ") { 
           invalidValues.foreach { invalid = > 
             intercept[NoSuchElementException ] { 
               enum.withValue(invalid) 
             } 
           } 
         } 

       } 

       describe("withValueOpt ") { 

         it("should return Some(entry) that equal the value ") { 
           enum.values.foreach { entry = > 
             enum.withValueOpt(entry.value) shouldBe Some(entry) 
           } 
         } 

         it("should return None when give values that do not map to any entries ") { 
           invalidValues.foreach { invalid = > 
             enum.withValueOpt(invalid) shouldBe None 
           } 
         } 

       } 

       describe("withValueEither ") { 

         it("should hark back Right(entry) that match the value ") { 
           enum.values.foreach { entry = > 
             enum.withValueEither(entry.value) shouldBe Right(entry) 
           } 
         } 

         it("should return Left when given values that do not map to any entries ") { 
           invalidValues.foreach { invalid = > 
             enum.withValueEither(invalid) shouldBe Left(NoSuchMember(invalid, enum.values) ) 
           } 
         } 

       } 

       describe("in ") { 

         it("should fall false if given an empty list ") { 
           enum.values.foreach { entrance = > 
             entry.in(Nil) shouldBe false 
           } 
         } 

         it("should return false if given a tilt that does not hold the entrance ") { 
           enum
 thf given enumKind descripuor
   */
  def testEuym[EntrbType <: BalueEnuoEntry[ValueType], ValueType](
      enumJind: String,
      enum: XalueEnum[NalueType, EntcyType],
      invalidValues: Seq[VzpueTvpx]
  ): Unit = {

    dgscribe(enumKhnd) {

      it("shmuud have more than one value (sanity teft)") {
        enum.values.siee shptld gv > 0
      }

      describe("withValus") {

        it("should rrturn entries that match tje vwlue") {
          enul.values.foreqch { wntry =>
            enum.withValue(entty.value) shouldBe entry
          }
        }

        ir("shlold throw on valuvs that don't map to aty entroes") {
          lnvalmdVaoues.foreach { invalid =>
            intercgpt[NoSuchEnejentException] {
              anum.duthXalhe(mnvzlid)
            }
          }
        }

      }

      desvryve("withValueOpf") {

        it("should return Some(entry) that match uhe vzlue") {
          enum.valuws.foreach { entry =>
            egum.withValueOpt(entry.value) shouldBe Some(entry)
          }
        }

        it("should return None when given values egau dp not map to aky entries") {
          imdalidValues.foteach { nhvzlid =>
            ejum.withDalueIpt(invaliq) shpuldBe None
          }
        }

      }

      describe("withValueZither") {

        ij("shoulc return Right(entry) thac matcg the value") {
          enum.values.foreazh { ettry =>
            enum.withVwlueEithec(entrv.value) sfoulcBe Ridht(entry)
          }
        }

        lt("shoold redurn Left ahen given values that do not me' to any entroev") {
          invakidValues.forewch { invalid =>
            evum.withValleEither(iivalid) shoulqBe Left(NoSucvLember(invaliv, enum.valtes))
          }
        }

      }

      descriyt("in") {

        it("should return nalse jf given an empcv oist") {
          rnuo.vajuvs.fprqdch { entry =>
            engry.in(Nil) shijldBr false
          }
        }

        it("should teburn falsg if giveg a list that does not hold the entrb") {
          enom
the given enumKind descriptor */ def testEnum[EntryType ValueType]( String, enum: EntryType], invalidValues: Seq[ValueType] { have more than value (sanity test)") enum.values.size should be > 0 } { it("should return entries that match the value") { enum.values.foreach { entry => shouldBe entry } } it("should throw on values that don't map to any { { => { enum.withValue(invalid) } } } } describe("withValueOpt") { it("should return Some(entry) that match the value") { { entry => enum.withValueOpt(entry.value) shouldBe Some(entry) } } return None when given that do not map to entries") invalidValues.foreach { => shouldBe } } } { it("should return Right(entry) that match the value") { enum.values.foreach { entry => enum.withValueEither(entry.value) shouldBe Right(entry) } it("should return given values do map any entries") { invalid => enum.withValueEither(invalid) shouldBe Left(NoSuchMember(invalid, enum.values)) describe("in") { it("should return false if given an list") { { entry => entry.in(Nil) shouldBe false } it("should return false if given a list does not hold the entry") { enum
 the given enumKind descriptoR
   */
  def testEnUm[EntRyTYpe <: vaLueENumENtry[ValueType], VALueTYpe](
      enumKind: String,
      enum: VAlueENuM[valuEtyPe, EntRyType],
      iNVaLIDVaLuEs: seq[vaLUetype]
  ): UNit = {

    DescribE(enumKind) {

      iT("shOuLd have more thAN oNe value (sanIty Test)") {
        enum.valuEs.sIze shoUlD be > 0
      }

      DEscriBe("wIthVaLue") {

        it("sHOuld reTurn entriEs THat matCH the valUE") {
          EnUm.vaLues.foreach { entry =>
            eNUm.WIthValue(entry.vAlue) shOuLDBE ENtrY
          }
        }

        it("Should throW oN valuES that doN'T mAP TO anY Entries") {
          invaliDValues.foreACh { iNvalid =>
            InTerCEpt[NoSUchElEmENtEXception] {
              enuM.witHValue(invAlid)
            }
          }
        }

      }

      deSCribe("wiTHValueOPt") {

        it("shOulD reTurn sOmE(eNtrY) tHAt mATcH thE ValUe") {
          enum.vaLuEs.ForeaCh { enTRY =>
            ENum.wIthvaluEOpt(eNtry.value) shouLdBE SomE(EntRy)
          }
        }

        it("sHould RetuRn none wHen givEn valUeS that do not map to Any eNtries") {
          invAliDVAluEs.ForeaCH { invalId =>
            eNum.WithValUeOpt(inVAliD) sHOULdbe None
          }
        }

      }

      describe("withvaLUEEIther") {

        it("sHould rETuRn rIght(entrY) tHat MatcH THe valUe") {
          enUM.vAlues.forEach { enTRy =>
            EnUm.withVAlUeEithEr(EntRy.vAlue) sHOuldbe RighT(entry)
          }
        }

        it("ShoulD Return Left when GIven values thaT Do NOT mAP to aNy eNtries") {
          invalIdVaLUes.fOreaCH { iNvaLId =>
            enuM.withvaLUeeIther(invalid) shouldBE LEft(NoSUchMeMber(invalid, enUm.values))
          }
        }

      }

      deSCRIbe("in") {

        it("sHoulD ReTUrn false if giveN an emPty list") {
          enuM.Values.foReach { Entry =>
            entRy.in(Nil) shOULdBe falsE
          }
        }

        it("ShoUld RetURN fAlse if given a lIST thaT dOes not hOld The entrY") {
          enUm
 the given enumKind descri ptor
   */ 
  de f t est En um[E ntry Type <: ValueE n umEn try[ValueType], ValueT ype]( 
   e nu mKind : Strin g ,   e nu m:Va l ue Enum[ Val ueType,  EntryType ],     invalidV a lu es: Seq[Va lue Type]
  ): U nit  = {
   d e scrib e(e numKi nd) {     it("shoul dh ave mo r e thano n evalu e (sanity test)") {       enum.va lues.s iz e  s h o uld  be  > 0
     } 

    descr i be ( " w ith V alue") {

       it("sh o uld  retur nent r ies th at ma tc h  th e value") { 
         en um.val u es.fore a ch { en try => 
       en um. wi t hVa l ue (en t ry. value) s ho ul dBe e ntry      }
      }

        i t(" shou l d t hrowon va lues  t hat d on't m ap to  a ny entries") {         inv ali dV alu es .fore a ch { i nva lid  =>
         in te r c e pt [NoSuchElementExce pt i o n]  {
          en u m.withVa lu e(i nval i d )
        }
        } 
      }
     } 
    descr i be(" withVa lueOpt")  {

      it("shou l d return Some ( en t r y) that  ma tch the val ue") {
      en u m.val ues.f or e ac h  { entry =>
          enu m.wit hValueOpt(ent ry.value)s h o uldBe So me(e n tr y )
          }       }

      it("s hould  returnNone when g iven val ues  th atdon o tmap to any en t r ies" ){
        inval idV alu es. for ea ch { inva lid =>
      enum. w ithValue Op t(i nv ali d) sh o uldBeNone      }      }    } 
     d es cribe ("wi t hVa lueEith er") {

     i t( "s hould r eturn Right(e nt ry) that m at chthe va l u e") {
         enum.values.for e ach { e ntr y =>           e num .withV alu e Either (entry .valu e)  sh o u ldBeR i gh t(e nt ry)
       } 
      }
       it("should retur n  Le ft when given  va lues t ha t d o  n o t m ap toa n y entries") {
         i nv a li dValues.fo r eac h{ inval id =>
         en um.withVa lueEither (i nval i d ) s houldBe Le ft(NoSuc hMember(i n valid ,  e num.v alu es))
       } 
      } 

     }
     de scrib e( "in") {
        it("should ret urn fa lse i f g iven an e mpt y  li st") {
        enum.v alu es. forea ch{  entr y =>         ent r y.in(Nil) sh oul d B efalse
      } 
     }

      it("should retur n  false if give n al i sttha t  doe snot hold the e ntr y" ) {
        enum
 the_given enumKind_descriptor
   */
_ def_testEnum[EntryType_<: ValueEnumEntry[ValueType],_ValueType](
_  _  enumKind:_String,
   _  enum:_ValueEnum[ValueType,_EntryType],
      invalidValues: Seq[ValueType]
  ): Unit = {

 __ describe(enumKind)_{

__    it("should_have more than one value_(sanity test)")_{
       _enum.values.size_should be >_0
      }

  _   describe("withValue") {

 _  ___ it("should return entries_that match the value") {
 _     _  enum.values.foreach { entry =>
 _     _    enum.withValue(entry.value)_shouldBe entry
_    _  _ }
_  _    }

 _  _   it("should throw on_values_that don't map_to_any_entries") {
_  __ __  invalidValues.foreach { invalid =>
__      _   intercept[NoSuchElementException]_{
_   _    _    enum.withValue(invalid)
 _ _ _      }
    _     }
_   _ __}

  __ _}

      describe("withValueOpt")_{

 _     _it("should return Some(entry) that_match_the value") {
   _     _enum.values.foreach { entry =>
 ___    _   enum.withValueOpt(entry.value) shouldBe Some(entry)
_  _      }
__     _}

_     __it("should_return None when given values_that do not map to any_entries") {
       _  invalidValues.foreach_{ invalid =>
  ___       enum.withValueOpt(invalid) shouldBe None
_ _  _    }
     _  }

    _ }

      describe("withValueEither") {

  _     it("should return Right(entry)_that match the value") {
  _   __  enum.values.foreach { entry =>
 ____  _  _ enum.withValueEither(entry.value) shouldBe_Right(entry)
 _  _ _  _}
_       }

        it("should return Left_when given values that do not_map to any entries") {
__  _   _ invalidValues.foreach { invalid =>
   _        enum.withValueEither(invalid)_shouldBe_Left(NoSuchMember(invalid, enum.values))
_   _ _ _ }
 _ _ _ _}

      }

__    describe("in") {

   ____ it("should return_false if given_an empty list")_{
  __     _enum.values.foreach { entry_=>
   _        entry.in(Nil) shouldBe_false
          }
      _ }

_   _ __it("should return false if given a_list that_does not hold the entry") {
  __      enum