package Ġchat . wil low . war ren . handler . r pl . is upport Ċ Ċ import Ġchat . wil low . war ren . state . Channel Types State Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ Ċ class ĠR pl 0 0 5 Chan Types Handler Tests Ġ{ ĊĊĠĠĠ Ġlateinit Ġvar Ġhandler : ĠIR pl 0 0 5 Chan Types Handler ĊĠĠĠ Ġlateinit Ġvar Ġchannel Types State : ĠChannel Types State ĊĠĠĠ Ġval Ġchannel Types Ġ= Ġset Of ('# ', Ġ'& ') ĊĠĠĠ Ġval Ġinitial Channel Types State Ġ= ĠChannel Types State ( channel Types ) ĊĊĠĠĠ Ġ@ Before Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġhandler Ġ= ĠR pl 0 0 5 Chan Types Handler ĊĠĠĠĠĠĠĠ Ġchannel Types State Ġ= ĠChannel Types State ( channel Types ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġtest _ Well For med _ Defaults () Ġ{ ĊĠĠĠĠĠĠĠ Ġhandler . handle (" &# ", Ġchannel Types State ) ĊĊĠĠĠĠĠĠĠ Ġval Ġchannel Types Ġ= Ġset Of ('& ', Ġ'# ') ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( Channel Types State ( channel Types ), Ġchannel Types State ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġtest _ Well For med _ Ar bitrary Examples () Ġ{ ĊĠĠĠĠĠĠĠ Ġhandler . handle (" ! @ Â £ $ %^ & * ()", Ġchannel Types State ) ĊĊĠĠĠĠĠĠĠ Ġval Ġchannel Types Ġ= Ġset Of (' !', Ġ'@ ', Ġ' Â £ ', Ġ'$ ', Ġ'% ', Ġ'^ ', Ġ'& ', Ġ'*', Ġ' (', Ġ') ') ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( Channel Types State ( channel Types ), Ġchannel Types State ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġtest _ Malformed _ EmptyString _ DoesNot Change State () Ġ{ ĊĠĠĠĠĠĠĠ Ġhandler . handle ("", Ġchannel Types State ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( initial Channel Types State , Ġchannel Types State ) ĊĠĠĠ Ġ} Ċ } Ċ