updated the example to include the case class and full test method