### Question:
HapticInterfaceManager { public void refreshHapticData(View root) { if(proxyHolder.get() != null) { ISdl proxy = proxyHolder.get(); if (userHapticData == null) { List<HapticRect> hapticRects = new ArrayList<>(); findHapticRects(root, hapticRects); SendHapticData msg = new SendHapticData(); msg.setHapticRectData(hapticRects); proxy.sendRPC(msg); } } } HapticInterfaceManager(ISdl proxy); void setHapticData(List<HapticRect> hapticData); void refreshHapticData(View root);  }### Answer:
@Test public void testRefreshHapticData() throws Exception { View root = createViews(); hapticMgr.refreshHapticData(root); verify(mockProxy).sendRPC(captor.capture()); SendHapticData data = captor.getValue(); assertNotNull("SendHapticData RPC", data); List<HapticRect> list = data.getHapticRectData(); assertNotNull("List", list); assertEquals("Haptic Rects", 4, list.size()); }
@Test public void testRefreshHapticDataNull() throws Exception { hapticMgr.refreshHapticData(null); verify(mockProxy).sendRPC(captor.capture()); SendHapticData data = captor.getValue(); assertNotNull("SendHapticData RPC", data); List<HapticRect> list = data.getHapticRectData(); assertNull("List", list); }