update: add entity tests and make entity more testable.

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
Merge branch 'master' of https://github.com/kimkulling/zfxce2