package Ġcom . github . vh rom ada . catalog . facade Ċ Ċ import Ġcom . github . vh rom ada . catalog . Test Configuration Ċ import Ġcom . github . vh rom ada . catalog . utils . Audit Utils Ċ import Ġcom . github . vh rom ada . catalog . utils . Genre Utils Ċ import Ġcom . github . vh rom ada . catalog . utils . Medium Utils Ċ import Ġcom . github . vh rom ada . catalog . utils . Movie Utils Ċ import Ġcom . github . vh rom ada . catalog . utils . Picture Utils Ċ import Ġcom . github . vh rom ada . catalog . utils . Test Constants Ċ import Ġcom . github . vh rom ada . catalog . utils . fill Audit Ċ import Ġcom . github . vh rom ada . catalog . utils . updated Ċ import Ġcom . github . vh rom ada . common . entity . Time Ċ import Ġcom . github . vh rom ada . common . exception . Input Exception Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . assertj . core . api . Assertions . assertThat Thrown By Ċ import Ġorg . assertj . core . api . Soft Assertions . assert Soft ly Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . api . extension . Extend With Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . http . HttpStatus Ċ import Ġorg . springframework . test . annotation . Dir ties Context Ċ import Ġorg . springframework . test . annotation . Rollback Ċ import Ġorg . springframework . test . context . Context Configuration Ċ import Ġorg . springframework . test . context . junit . jupiter . Spring Extension Ċ import Ġorg . springframework . transaction . annotation . Transactional Ċ import Ġjavax . persistence . EntityManager Ċ import Ġjavax . persistence . Persistence Context Ċ Ċ /** Ċ Ġ* ĠA Ġclass Ġrepresents Ġtest Ġfor Ġclass Ġ[ Movie Facade ]. Ċ Ġ* Ċ Ġ* Ġ@ author ĠV lad im ir ĠH rom ada Ċ Ġ*/ Ċ @ Extend With ( Spring Extension :: class ) Ċ @ Context Configuration ( classes Ġ= Ġ[ Test Configuration :: class ]) Ċ @ Transactional Ċ @ Rollback Ċ class ĠMovie Facade Spring Test Ġ{ ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠInstance Ġof Ġ[ EntityManager ] ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Persistence Context ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġentity Manager : ĠEntity Manager ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠInstance Ġof Ġ[ Movie Facade ] ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Autowired ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġfac ade : ĠMovie Facade ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . new Data ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Dir ties Context ĊĠĠĠ Ġfun ĠnewData () Ġ{ ĊĠĠĠĠĠĠĠ Ġfac ade . new Data () ĊĠĠĠĠĠĠĠ Ġentity Manager . flush () ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( 0 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( 0 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . getAll ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun ĠgetAll () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġfac ade . getAll () ĊĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie List Deep Equals ( expected Ġ= ĠMovie Utils . get Movies (), Ġactual Ġ= Ġresult ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . get ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġget () Ġ{ ĊĠĠĠĠĠĠĠ Ġfor Ġ( i Ġin Ġ 1 .. Movie Utils . MO VI ES _ COUNT ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmovie Ġ= ĠMovie Utils . get Movie ( index Ġ= Ġi ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġfac ade . get ( uuid Ġ= Ġmovie . uuid ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= ĠMovie Utils . get Movie ( index Ġ= Ġi ), Ġactual Ġ= Ġresult ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . get ] Ġwith Ġnot Ġexisting ĠUUID . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġget Not Existing () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . get ( uuid Ġ= ĠTest Constants . UUID ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Movie Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Dir ties Context ĊĠĠĠ Ġfun Ġadd () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexpected Movie Ġ= ĠMovie Utils . new Movie () ĊĠĠĠĠĠĠĠ Ġval Ġexpected Domain Movie Ġ= ĠMovie Utils . new Domain Movie ( id Ġ= ĠMovie Utils . MO VI ES _ COUNT Ġ+ Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( picture Ġ= Ġ 1 , Ġgen res Ġ= Ġmutable ListOf ( Genre Utils . get Domain Genre ( index Ġ= Ġ 1 ))) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Audit ( audit Ġ= ĠAudit Utils . new Audit ()) ĊĠĠĠĠĠĠĠ Ġval Ġexpected Domain Media Ġ= Ġexpected Domain Movie . media . map Indexed Ġ{ Ġindex , Ġmedium Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmedium . copy ( id Ġ= ĠMedium Utils . MEDIA _ COUNT Ġ+ Ġindex Ġ+ Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Audit ( audit Ġ= ĠAudit Utils . new Audit ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġexpected Domain Movie . media . clear () ĊĠĠĠĠĠĠĠ Ġexpected Domain Movie . media . addAll ( expected Domain Media ) ĊĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġfac ade . add ( request Ġ= ĠMovie Utils . new Request ()) ĊĠĠĠĠĠĠĠ Ġentity Manager . flush () ĊĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġexpected Movie , Ġactual Ġ= Ġresult ) ĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġexpected Domain Movie , Ġactual Ġ= ĠMovie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= ĠMovie Utils . MO VI ES _ COUNT Ġ+ Ġ 1 )) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT Ġ+ Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT Ġ+ Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġnull Ġc zech Ġname . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Null C zech Name () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( c zech Name Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ C ZE CH _ NAME _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" C zech Ġname Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġempty Ġstring Ġas Ġc zech Ġname . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Empty C zech Name () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( c zech Name Ġ= Ġ"") ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ C ZE CH _ NAME _ EMPTY ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" C zech Ġname Ġmust n 't Ġbe Ġempty Ġstring .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġnull Ġoriginal Ġname . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Null Original Name () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( original Name Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ ORIGIN AL _ NAME _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Original Ġname Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġempty Ġoriginal Ġname . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Empty Original Name () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( original Name Ġ= Ġ"") ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ ORIGIN AL _ NAME _ EMPTY ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Original Ġname Ġmust n 't Ġbe Ġempty Ġstring .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġnull Ġyear . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Null Year () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( year Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ YEAR _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Year Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġbad Ġminimum Ġyear . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Bad Minimum Year () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( year Ġ= ĠTest Constants . BAD _ MIN _ YEAR ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing ( Test Constants . INVALID _ MOV IE _ YEAR _ EVENT . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġbad Ġmaximum Ġyear . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Bad Maximum Year () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( year Ġ= ĠTest Constants . BAD _ MAX _ YEAR ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing ( Test Constants . INVALID _ MOV IE _ YEAR _ EVENT . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġnull Ġlanguage . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Null Language () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( language Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ LANGUAGE _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Language Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġnull Ġsub titles . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Null Sub titles () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( subtitle s Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ SUB TIT LES _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Sub titles Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġsub titles Ġwith Ġnull Ġvalue . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Bad Sub titles () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( subtitle s Ġ= ĠlistOf ( null )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ SUB TIT LES _ CONTAIN _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Sub titles Ġmust n 't Ġcontain Ġnull Ġvalue .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġnull Ġmedia . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Null Media () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( media Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ MEDIA _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Media Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġmedia Ġwith Ġnull Ġvalue . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Bad Media () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( media Ġ= ĠlistOf ( null )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ MEDIA _ CONTAIN _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Media Ġmust n 't Ġcontain Ġnull Ġvalue .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġmedia Ġwith Ġnegative Ġvalue Ġas Ġmedium . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Media Bad Medium () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( media Ġ= ĠlistOf (- 1 )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ MEDIUM _ NOT _ POSITIVE ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Medium Ġmust Ġbe Ġpositive Ġnumber .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġbad Ġminimal ĠIM DB Ġcode . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Bad Minimal I mdb () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( imdb Code Ġ= ĠTest Constants . BAD _ MIN _ IM DB _ CODE ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing ( Test Constants . INVALID _ MOV IE _ IM DB _ CODE _ EVENT . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġbad Ġdivider ĠIM DB Ġcode . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Bad Divider I mdb () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( imdb Code Ġ= Ġ 0 ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing ( Test Constants . INVALID _ MOV IE _ IM DB _ CODE _ EVENT . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġbad Ġmax imal ĠIM DB Ġcode . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Bad Max imal I mdb () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( imdb Code Ġ= ĠTest Constants . BAD _ MAX _ IM DB _ CODE ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing ( Test Constants . INVALID _ MOV IE _ IM DB _ CODE _ EVENT . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġnull Ġgen res . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Null Gen res () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( genres Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ GEN RES _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Gen res Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġgen res Ġwith Ġnull Ġvalue . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Bad Gen res () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( genres Ġ= ĠlistOf ( null )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ GEN RES _ CONTAIN _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Gen res Ġmust n 't Ġcontain Ġnull Ġvalue .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġrequest Ġwith Ġgen res Ġwith Ġempty Ġgenre . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Gen res Bad Genre () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( genres Ġ= ĠlistOf ("")) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ GEN RE _ EMPTY ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Genre Ġmust n 't Ġbe Ġempty Ġstring .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġnot Ġexisting Ġlanguage . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Not Existing Language () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( language Ġ= ĠTest Constants . UUID ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" REGISTER _ VALUE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Register 's Ġvalue Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġnot Ġexisting Ġsub titles . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Not Existing Sub titles () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( subtitle s Ġ= ĠlistOf ( Test Constants . UUID )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" REGISTER _ VALUE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Register 's Ġvalue Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġnot Ġexisting Ġpicture . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Not Existing Picture () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( picture Ġ= ĠTest Constants . UUID ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" PI CTURE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Picture Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . add ] Ġwith Ġnot Ġexisting Ġgenre . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Not Existing Genre () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( genres Ġ= Ġmutable ListOf ( Test Constants . UUID )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . add ( request Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" GEN RE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Genre Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Dir ties Context ĊĠĠĠ Ġfun Ġupdate () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠ Ġval Ġexpected Movie Ġ= ĠMovie Utils . get Movie ( index Ġ= Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( picture Ġ= ĠPicture Utils . get Picture ( index Ġ= Ġ 1 ). uuid , Ġmedia Ġ= ĠlistOf ( Medium Utils . new Medium ())) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. updated () ĊĠĠĠĠĠĠĠ Ġval Ġexpected Domain Movie Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( picture Ġ= Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. updated () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Audit ( audit Ġ= ĠAudit Utils . updated Audit ()) ĊĠĠĠĠĠĠĠ Ġexpected Domain Movie . media . forEach Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . length Ġ= Ġ 1 0 ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . fill Audit ( audit Ġ= ĠAudit Utils . updated Audit ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) ĊĠĠĠĠĠĠĠ Ġentity Manager . flush () ĊĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġexpected Movie , Ġactual Ġ= Ġresult ) ĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġexpected Domain Movie , Ġactual Ġ= ĠMovie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= Ġ 1 )) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġnull Ġc zech Ġname . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Null C zech Name () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( c zech Name Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ C ZE CH _ NAME _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" C zech Ġname Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġempty Ġstring Ġas Ġc zech Ġname . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Empty C zech Name () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( c zech Name Ġ= Ġ"") ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ C ZE CH _ NAME _ EMPTY ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" C zech Ġname Ġmust n 't Ġbe Ġempty Ġstring .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġnull Ġoriginal Ġname . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Null Original Name () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( original Name Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ ORIGIN AL _ NAME _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Original Ġname Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġempty Ġoriginal Ġname . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Empty Original Name () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( original Name Ġ= Ġ"") ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ ORIGIN AL _ NAME _ EMPTY ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Original Ġname Ġmust n 't Ġbe Ġempty Ġstring .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġnull Ġyear . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Null Year () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( year Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ YEAR _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Year Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġbad Ġminimum Ġyear . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Bad Minimum Year () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( year Ġ= ĠTest Constants . BAD _ MIN _ YEAR ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing ( Test Constants . INVALID _ MOV IE _ YEAR _ EVENT . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġbad Ġmaximum Ġyear . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Bad Maximum Year () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( year Ġ= ĠTest Constants . BAD _ MAX _ YEAR ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing ( Test Constants . INVALID _ MOV IE _ YEAR _ EVENT . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġnull Ġlanguage . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Null Language () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( language Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ LANGUAGE _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Language Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġnull Ġsub titles . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Null Sub titles () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( subtitle s Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ SUB TIT LES _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Sub titles Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġsub titles Ġwith Ġnull Ġvalue . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Bad Sub titles () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( subtitle s Ġ= ĠlistOf ( null )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ SUB TIT LES _ CONTAIN _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Sub titles Ġmust n 't Ġcontain Ġnull Ġvalue .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġnull Ġmedia . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Null Media () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( media Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ MEDIA _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Media Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġmedia Ġwith Ġnull Ġvalue . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Bad Media () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( media Ġ= ĠlistOf ( null )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ MEDIA _ CONTAIN _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Media Ġmust n 't Ġcontain Ġnull Ġvalue .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġmedia Ġwith Ġnegative Ġvalue Ġas Ġmedium . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Media Bad Medium () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( media Ġ= ĠlistOf (- 1 )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ MEDIUM _ NOT _ POSITIVE ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Medium Ġmust Ġbe Ġpositive Ġnumber .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġbad Ġminimal ĠIM DB Ġcode . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Bad Minimal I mdb () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( imdb Code Ġ= ĠTest Constants . BAD _ MIN _ IM DB _ CODE ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing ( Test Constants . INVALID _ MOV IE _ IM DB _ CODE _ EVENT . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġbad Ġdivider ĠIM DB Ġcode . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Bad Divider I mdb () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( imdb Code Ġ= Ġ 0 ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing ( Test Constants . INVALID _ MOV IE _ IM DB _ CODE _ EVENT . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġbad Ġmax imal ĠIM DB Ġcode . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Bad Max imal I mdb () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( imdb Code Ġ= ĠTest Constants . BAD _ MAX _ IM DB _ CODE ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing ( Test Constants . INVALID _ MOV IE _ IM DB _ CODE _ EVENT . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġnull Ġgen res . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Null Gen res () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( genres Ġ= Ġnull ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ GEN RES _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Gen res Ġmust n 't Ġbe Ġnull .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġgen res Ġwith Ġnull Ġvalue . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Bad Gen res () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( genres Ġ= ĠlistOf ( null )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ GEN RES _ CONTAIN _ NULL ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Gen res Ġmust n 't Ġcontain Ġnull Ġvalue .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġrequest Ġwith Ġgen res Ġwith Ġempty Ġgenre . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Gen res Bad Genre () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( genres Ġ= ĠlistOf ("")) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ GEN RE _ EMPTY ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Genre Ġmust n 't Ġbe Ġempty Ġstring .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġnot Ġexisting Ġlanguage . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Not Existing Language () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( language Ġ= ĠTest Constants . UUID ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" REGISTER _ VALUE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Register 's Ġvalue Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġnot Ġexisting Ġsub titles . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Not Existing Sub titles () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( subtitle s Ġ= ĠlistOf ( Test Constants . UUID )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" REGISTER _ VALUE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Register 's Ġvalue Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġnot Ġexisting Ġpicture . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Not Existing Picture () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( picture Ġ= ĠTest Constants . UUID ) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" PI CTURE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Picture Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġnot Ġexisting Ġgenre . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Not Existing Genre () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠMovie Utils . new Request () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( genres Ġ= Ġmutable ListOf ( Test Constants . UUID )) ĊĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ). uuid , Ġrequest Ġ= Ġrequest ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" GEN RE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Genre Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update ] Ġwith Ġnot Ġexisting ĠUUID . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Not Existing () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . update ( uuid Ġ= ĠTest Constants . UUID , Ġrequest Ġ= ĠMovie Utils . new Request ()) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Movie Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . remove ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġremove () Ġ{ ĊĠĠĠĠĠĠĠ Ġfac ade . remove ( uuid Ġ= ĠMovie Utils . get Movie ( index Ġ= Ġ 1 ). uuid ) ĊĠĠĠĠĠĠĠ Ġentity Manager . flush () ĊĊĠĠĠĠĠĠĠ ĠassertThat ( Movie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= Ġ 1 )). isNull () ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT Ġ- Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT Ġ- ĠMovie Utils . get Movie ( index Ġ= Ġ 1 ). media . size ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . remove ] Ġwith Ġnot Ġexisting ĠUUID . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġremove Not Existing () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . remove ( uuid Ġ= ĠTest Constants . UUID ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Movie Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . duplicate ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Dir ties Context ĊĠĠĠ Ġfun Ġduplicate () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexpected Movie Ġ= ĠMovie Utils . get Movie ( index Ġ= Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( uuid Ġ= ĠTest Constants . UUID ) ĊĠĠĠĠĠĠĠ Ġval Ġexpected Domain Movie Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( id Ġ= ĠMovie Utils . MO VI ES _ COUNT Ġ+ Ġ 1 , Ġuuid Ġ= ĠTest Constants . UUID , Ġposition Ġ= ĠMovie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Audit ( audit Ġ= ĠAudit Utils . new Audit ()) ĊĠĠĠĠĠĠĠ Ġval Ġexpected Domain Media Ġ= Ġexpected Domain Movie . media . map Indexed Ġ{ Ġindex , Ġmedium Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmedium . copy ( id Ġ= ĠMedium Utils . MEDIA _ COUNT Ġ+ Ġindex Ġ+ Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Audit ( audit Ġ= ĠAudit Utils . new Audit ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġexpected Domain Movie . media . clear () ĊĠĠĠĠĠĠĠ Ġexpected Domain Movie . media . addAll ( expected Domain Media ) ĊĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġfac ade . duplicate ( uuid Ġ= ĠMovie Utils . get Movie ( index Ġ= Ġ 1 ). uuid ) ĊĠĠĠĠĠĠĠ Ġentity Manager . flush () ĊĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġexpected Movie , Ġactual Ġ= Ġresult ) ĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġexpected Domain Movie , Ġactual Ġ= ĠMovie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= ĠMovie Utils . MO VI ES _ COUNT Ġ+ Ġ 1 )) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT Ġ+ Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT Ġ+ ĠMovie Utils . get Movie ( index Ġ= Ġ 1 ). media . size ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . duplicate ] Ġwith Ġnot Ġexisting ĠUUID . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġduplicate Not Existing () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . duplicate ( uuid Ġ= ĠTest Constants . UUID ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Movie Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . move Up ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmove Up () Ġ{ ĊĠĠĠĠĠĠĠ Ġfac ade . move Up ( uuid Ġ= ĠMovie Utils . get Movie ( index Ġ= Ġ 2 ). uuid ) ĊĠĠĠĠĠĠĠ Ġentity Manager . flush () ĊĊĠĠĠĠĠĠĠ Ġval Ġmovie 1 Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( position Ġ= Ġ 1 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Audit ( audit Ġ= ĠAudit Utils . updated Audit ()) ĊĠĠĠĠĠĠĠ Ġval Ġmovie 2 Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 2 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( position Ġ= Ġ 1 0 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Audit ( audit Ġ= ĠAudit Utils . updated Audit ()) ĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġmovie 1 , Ġactual Ġ= ĠMovie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= Ġ 1 )) ĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġmovie 2 , Ġactual Ġ= ĠMovie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= Ġ 2 )) ĊĠĠĠĠĠĠĠ Ġfor Ġ( i Ġin Ġ 3 .. Movie Utils . MO VI ES _ COUNT ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġi ), Ġactual Ġ= ĠMovie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= Ġi )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . move Up ] Ġwith Ġnot Ġmov able Ġmovie . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmove Up Not Mov able () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . move Up ( uuid Ġ= ĠMovie Utils . get Movie ( index Ġ= Ġ 1 ). uuid ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ NOT _ MOV ABLE ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Movie Ġcan 't Ġbe Ġmoved Ġup .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . move Up ] Ġwith Ġnot Ġexisting ĠUUID . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmove Up Not Existing () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . move Up ( uuid Ġ= ĠTest Constants . UUID ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Movie Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . move Down ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmove Down () Ġ{ ĊĠĠĠĠĠĠĠ Ġfac ade . move Down ( uuid Ġ= ĠMovie Utils . get Movie ( index Ġ= Ġ 1 ). uuid ) ĊĠĠĠĠĠĠĠ Ġentity Manager . flush () ĊĊĠĠĠĠĠĠĠ Ġval Ġmovie 1 Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( position Ġ= Ġ 1 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Audit ( audit Ġ= ĠAudit Utils . updated Audit ()) ĊĠĠĠĠĠĠĠ Ġval Ġmovie 2 Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġ 2 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( position Ġ= Ġ 1 0 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Audit ( audit Ġ= ĠAudit Utils . updated Audit ()) ĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġmovie 1 , Ġactual Ġ= ĠMovie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= Ġ 1 )) ĊĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġmovie 2 , Ġactual Ġ= ĠMovie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= Ġ 2 )) ĊĠĠĠĠĠĠĠ Ġfor Ġ( i Ġin Ġ 3 .. Movie Utils . MO VI ES _ COUNT ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġi ), Ġactual Ġ= ĠMovie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= Ġi )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . move Down ] Ġwith Ġnot Ġmov able Ġmovie . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmove Down Not Mov able () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . move Down ( uuid Ġ= ĠMovie Utils . get Movie ( index Ġ= ĠMovie Utils . MO VI ES _ COUNT ). uuid ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ NOT _ MOV ABLE ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Movie Ġcan 't Ġbe Ġmoved Ġdown .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . UN PROCESS ABLE _ ENTITY ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . move Down ] Ġwith Ġnot Ġexisting ĠUUID . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmove Down Not Existing () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat Thrown By Ġ{ Ġfac ade . move Down ( uuid Ġ= ĠTest Constants . UUID ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( Input Exception :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" MOV IE _ NOT _ EXIST ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message Containing (" Movie Ġdoesn 't Ġexist .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Field Or Property WithValue (" http Status ", ĠHttpStatus . NOT _ FOUND ) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . update Positions ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġupdate Positions () Ġ{ ĊĠĠĠĠĠĠĠ Ġfac ade . update Positions () ĊĠĠĠĠĠĠĠ Ġentity Manager . flush () ĊĊĠĠĠĠĠĠĠ Ġfor Ġ( i Ġin Ġ 1 .. Movie Utils . MO VI ES _ COUNT ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġexpected Movie Ġ= ĠMovie Utils . get Domain Movie ( index Ġ= Ġi ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy ( position Ġ= Ġi Ġ- Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Audit ( audit Ġ= ĠAudit Utils . updated Audit ()) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMovie Utils . assert Movie Deep Equals ( expected Ġ= Ġexpected Movie , Ġactual Ġ= ĠMovie Utils . get Domain Movie ( entityManager Ġ= Ġentity Manager , Ġid Ġ= Ġi )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠTest Ġmethod Ġfor Ġ[ Movie Facade . get Statistics ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġget Statistics () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġfac ade . get Statistics () ĊĊĠĠĠĠĠĠĠ ĠassertThat ( result . count ). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠ ĠassertThat ( result . media Count ). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠ ĠassertThat ( result . length ). isEqualTo ( Time ( length Ġ= Ġ 1 0 0 0 ). toString ()) ĊĊĠĠĠĠĠĠĠ Ġassert Soft ly Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Movie Utils . get Movies Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Movie Utils . MO VI ES _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Medium Utils . get Media Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Medium Utils . MEDIA _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Picture Utils . getP ictures Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Picture Utils . PI CTURE S _ COUNT ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . assertThat ( Genre Utils . get Gen res Count ( entityManager Ġ= Ġentity Manager )). isEqualTo ( Genre Utils . GEN RES _ COUNT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ Ċ } Ċ