Added tests into testplugin, fixed Core issues found using added tests

Signed-off-by: Marek Timko <marek.timko@ixonos.com>