### Question:
PairGovernorManager extends TimeSpanGovernorManager<Pair<T, Q>> { @Override public void clearData(Pair<T, Q> context) { List<TimeSpanGovernor> governors = getGovernors(context, false, true); for (TimeSpanGovernor governor : governors) { governor.clearData(); } } PairGovernorManager(Function<Pair<T, Q>, TimeSpanGovernor> generator); @Override void clearData(Pair<T, Q> context); @Override void clearData(Pair<T, Q> context, Collection<? extends TimeSpan> timeSpans); @Override void requestData(Pair<T, Q> context, Collection<? extends TimeSpan> timeSpans);  }### Answer:
@Test public void testClearData() { EasyMockSupport support = new EasyMockSupport(); TimeSpan span = TimeSpan.get(System.currentTimeMillis() - 10000, System.currentTimeMillis()); TimeSpanGovernor governor = createGovernor(support, span); governor.clearData(); EasyMock.expectLastCall().times(4); support.replayAll(); PairGovernorManager<String, Integer> manager = new PairGovernorManager<>(p -> governor); Pair<String, Integer> context = new Pair<>(ourStringId, Integer.valueOf(7)); manager.requestData(context, New.list(span)); manager.clearData(context); assertTrue(manager.findGovernors(p -> true).isEmpty()); manager.requestData(context, New.list(span)); manager.clearData(new Pair<>(null, Integer.valueOf(7))); assertTrue(manager.findGovernors(p -> true).isEmpty()); manager.requestData(context, New.list(span)); manager.clearData(new Pair<>(ourStringId, null)); assertTrue(manager.findGovernors(p -> true).isEmpty()); manager.requestData(context, New.list(span)); manager.clearData(new Pair<>(null, null)); assertTrue(manager.findGovernors(p -> true).isEmpty()); support.verifyAll(); }