test creation of Code entity for in-memory function