CommonJS module and pull out test code to an example.