Add unit tests for internal DSL