fixed intermittent unit test failure on java 7+

some tests were not properly cleaning up after themselves,
which was often masked by undefined test execution order
on java7 and newer

Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>