Implemented a JUnit TestRule example

Implemented a JUnit TestRule example