Fixed poc scenarios and added tests using testthat