### Question:
BiCounter extends Counter<Pair<T1, T2>> { public int value(T1 o1, T2 o2) { if (o1 == null) { return subtotal2.value(o2); } else if (o2 == null) { return subtotal1.value(o1); } else { Pair<T1, T2> pair = new Pair<T1, T2>(o1, o2); return super.value(pair); } } BiCounter(); BiCounter<T1, T2> add(T1 o1, T2 o2, int value); BiCounter<T1, T2> set(T1 o1, T2 o2, int value); BiCounter<T1, T2> inc(T1 o1, T2 o2); BiCounter<T1, T2> dec(T1 o1, T2 o2); BiCounter<T1, T2> add(BiCounter<T1, T2> counter); int value(T1 o1, T2 o2); Set<T1> leftKeySet(); Counter<T1> leftSubtotal(); Set<T2> rightKeySet(); Counter<T2> rightSubtotal(); @Override void clear();  }### Answer:
@Test public void testValue() { System.out.println("value"); Object o1 = null; Object o2 = null; BiCounter<Integer, Integer> bc = new BiCounter<Integer, Integer>(); bc.inc(1, 2); bc.inc(1, 3); bc.add(1, 3, 4); assertEquals(1, bc.value(1, 2)); assertEquals(5, bc.value(1, 3)); assertEquals(6, bc.value(1, null)); assertEquals(6, bc.total()); }