()
| 100 | } |
| 101 | |
| 102 | @Test |
| 103 | public void getRemoteAddressChanSet() throws Exception { |
| 104 | RegionClient rclient = mock(RegionClient.class); |
| 105 | PowerMockito.field(RegionClient.class, "chan").set(rclient, chan); |
| 106 | PowerMockito.when(chan.getRemoteAddress().toString()).thenReturn("127.0.0.1"); |
| 107 | PowerMockito.when(rclient.getRemoteAddress()).thenCallRealMethod(); |
| 108 | |
| 109 | assertNotNull(Whitebox.getInternalState(rclient, "chan")); |
| 110 | String addy = rclient.getRemoteAddress(); |
| 111 | assertNotNull(addy); |
| 112 | assertEquals(addy, "127.0.0.1"); |
| 113 | } |
| 114 | |
| 115 | @Test |
| 116 | public void exceptionCaught() throws Exception { |
nothing calls this directly
no test coverage detected