Unit test to avoid regression of PermGen leaks (ensure fix of #170 contributed by #173)