()
| 113 | } |
| 114 | |
| 115 | @Test |
| 116 | public void exceptionCaught() throws Exception { |
| 117 | PowerMockito.mockStatic(Channels.class); |
| 118 | when(chan.isOpen()).thenReturn(true); |
| 119 | final RegionClient rclient = PowerMockito.spy(new RegionClient(hbase_client)); |
| 120 | PowerMockito.field(RegionClient.class, "chan").set(rclient, chan); |
| 121 | final ExceptionEvent event = new DefaultExceptionEvent(chan, |
| 122 | new RuntimeException("Boo!")); |
| 123 | |
| 124 | rclient.exceptionCaught(null, event); |
| 125 | |
| 126 | verifyPrivate(rclient, never()).invoke("cleanup", chan); |
| 127 | PowerMockito.verifyStatic(); |
| 128 | Channels.close(chan); |
| 129 | } |
| 130 | |
| 131 | @Test |
| 132 | public void exceptionCaughtChNotOpen() throws Exception { |
nothing calls this directly
no test coverage detected