update test to prove that there is no memory leaks