@Test
public void programsFactorial() throws IOException {
// Instantiate the code model
JSCodeModel codeModel = new CodeModelImpl();
// Create the program
JSProgram program = codeModel.program();
// Add a function declaration
JSFunctionDeclaration factorial = program
.functionDeclaration("factorial");
// Add a function parameter
JSVariable x = factorial.parameter("x");