### Question:
PairGovernorManager extends TimeSpanGovernorManager<Pair<T, Q>> { @Override public void requestData(Pair<T, Q> context, Collection<? extends TimeSpan> timeSpans) { List<TimeSpanGovernor> governors = getGovernors(context, true, false); for (TimeSpan span : timeSpans) { for (TimeSpanGovernor governor : governors) { governor.requestData(span); } } } 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 testRequestData() { EasyMockSupport support = new EasyMockSupport(); TimeSpan span = TimeSpan.get(System.currentTimeMillis() - 10000, System.currentTimeMillis()); TimeSpanGovernor governor = createGovernor(support, span); 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)); assertEquals(1, manager.findGovernors(p -> true).size()); manager.requestData(new Pair<>(null, Integer.valueOf(7)), New.list(span)); assertEquals(1, manager.findGovernors(p -> true).size()); manager.requestData(new Pair<>(ourStringId, null), New.list(span)); assertEquals(1, manager.findGovernors(p -> true).size()); manager.requestData(new Pair<>(null, null), New.list(span)); assertEquals(1, manager.findGovernors(p -> true).size()); support.verifyAll(); }