Fix ClassCastException in end of tests
Merge pull request #306 from nmusienko/classCast

Fix ClassCastException in end of tests