IdentifiedVisitor { public void unset() { tracker.unsetParam(Hit.HitParam.VisitorIdentifierNumeric.stringValue()); tracker.unsetParam(Hit.HitParam.VisitorIdentifierText.stringValue()); tracker.unsetParam(Hit.HitParam.VisitorCategory.stringValue()); Tracker.getPreferences().edit().putString(VISITOR_NUMERIC, null) .putString(VISITOR_CATEGORY, null) .putString(VISITOR_TEXT, null).apply(); } IdentifiedVisitor(Tracker tracker); Tracker set(long visitorId); Tracker set(long visitorId, int visitorCategory); Tracker set(long visitorId, String visitorCategory); Tracker set(String visitorId); Tracker set(String visitorId, int visitorCategory); Tracker set(String visitorId, String visitorCategory); void unset();  }
@Test public void unsetTest() { identifiedVisitor.set("visitor", 1); assertEquals(2, buffer.getPersistentParams().size()); assertEquals(0, buffer.getVolatileParams().size()); identifiedVisitor.unset(); assertEquals(0, buffer.getPersistentParams().size()); assertEquals(0, buffer.getVolatileParams().size()); }