\documentclass{article}
\usepackage{statements}
\begin{document}
\begin{module}[id=testmod]
\makeatletter
\begin{definition}[id=foo.def]
 testing a simple *\definiendum{defi}*

 testing *\definiendum[foo]{the definiendum}*
\end{definition}

first result should be ``defi'': \testmod@defi

first result should be ``the definiendum'': \testmod@foo

\termdef{foobar}{foobar}
\foobar
\end{module}
\end{document}
