package Ġio . de loop . tools . proxy Ċ Ċ import Ġcom . google . testing . compile . Compilation Subject Ċ import Ġcom . google . testing . compile . Compilation Subject . assertThat Ċ import Ġcom . google . testing . compile . Compiler . javac Ċ import Ġcom . google . testing . compile . Java File Objects Ċ import Ġorg . junit . Test Ċ Ċ class ĠValidation Test Ġ{ ĊĊĠĠĠ Ġ@ Test Ġfun Ġshould Suc ceed For Valid Interface () Ġ{ ĊĠĠĠĠĠĠĠ Ġcompiling (" Valid Interface . java "). succeeded Without Warnings () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġshould Fail When Too Many Methods Annotated As Replay Always () Ġ{ ĊĠĠĠĠĠĠĠ Ġcompiling (" Too Many Replay Always . java ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. had Error Containing (" Interface Ġhas Ġtoo Ġmany Ġmethods Ġannotated Ġwith ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġshould Fail When Class Annotated () Ġ{ ĊĠĠĠĠĠĠĠ Ġcompiling (" Invalid Annotated Type . java ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. had Error Containing (" can Ġonly Ġbe Ġapplied Ġto Ġinterfaces ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġshould Fail When ReturnType Is Invalid () Ġ{ ĊĠĠĠĠĠĠĠ Ġcompiling (" Invalid ReturnType . java ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. had Error Containing (" Has Ġnon - void Ġmethod ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġshould Fail When Inherited Method ReturnType Is Invalid () Ġ{ ĊĠĠĠĠĠĠĠ Ġcompiling (" Invalid Inherited Method A . java ", Ġ" Invalid Inherited Method B . java ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. had Error Containing (" Has Ġnon - void Ġmethod ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġcompiling ( var arg Ġfiles : ĠString ): ĠCompilation Subject Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġjava Objects Ġ= Ġfiles ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġ" validation /$ it " Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĠJava File Objects . for Resource ( it ) Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn ĠassertThat ( javac () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. with Processors ( Replay Proxy Processor ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. compile ( java Objects )) ĊĠĠĠ Ġ} Ċ } Ċ