unit tests for R