added tests for P01 - P04 with scalatest