Adde java counter test
Fixed AccessGroupGarbageTracker to avoid repeated unnecessary garbage checks