Added resource test cases

Fix #365 
@naegelyd 
Signed-off-by: Sheik Hassan <solergiga@yahoo.com>
What's the purpose of checking `count_after` and `count_before + 1` here? The save will create the Variant or it will throw an exception. Remove the `count_*` variables and this `assertEqual` call.