Usage { public Function sampleFunction() { Function sampleFunction = _Function(_Int(), "addTwo", asList(_Arg(_Int(), "x"), _Arg(_Int(), "y")), asList(_Return(_Add(_Variable("x"), _Variable("y"))))); return sampleFunction; }  Function sampleFunction(); Set<Integer> expressionLiterals(Expression expression); boolean hasReturn(List<Statement> statements);  }
@Test public void testSampleFunction() { final Function expectedFunction = _Function(_Int(), "addTwo", asList(_Arg(_Int(), "x"), _Arg(_Int(), "y")), asList( _Return(_Add(_Variable("x"), _Variable("y"))) )); assertEquals(expectedFunction, usage.sampleFunction()); }