hopfield: simple tests and interface added.