### Question:
Tracker implements TrackerMBean { String findTid( String uri ) { Matcher m = patternGetTid.matcher( uri ); if( m.matches() ) return m.group( 1 ); else return null; } private  Tracker(); static Tracker getInstance(); synchronized void register(); void addTenant(String tenantId); void removeTenant(String tenantId); void removeAllTenants(); Set getTenants(); void addMetricName(String metricName); void removeMetricName(String metricName); void removeAllMetricNames(); Set<String> getMetricNames(); void setIsTrackingDelayedMetrics(); void resetIsTrackingDelayedMetrics(); boolean getIsTrackingDelayedMetrics(); boolean isTracking(String tenantId); boolean doesMessageContainMetricNames(String logmessage); void track(HttpRequest request); void trackResponse(HttpRequest request, FullHttpResponse response); void trackDelayedMetricsTenant(String tenantid, final List<Metric> delayedMetrics); void trackDelayedAggregatedMetricsTenant(String tenantId, long collectionTimeMs, long delayTimeMs, List<String> delayedMetricNames); static final String trackerName; }### Answer:
@Test public void testFindTidFound() { assertEquals( tracker.findTid( "/v2.0/6000/views" ), "6000" ); }
@Test public void testTrackTenantNoVersion() { assertEquals( tracker.findTid( "/6000/views" ), null ); }
@Test public void testTrackTenantBadVersion() { assertEquals( tracker.findTid( "blah/6000/views" ), null ); }
@Test public void testTrackTenantTrailingSlash() { assertEquals( tracker.findTid( "/v2.0/6000/views/" ), "6000" ); }