add snippet for test method - (use testthat library for writing tests)