()
| 708 | } |
| 709 | |
| 710 | @Test |
| 711 | public void handleRootZnode90Resolve() throws Exception { |
| 712 | final InetAddress addr = mock(InetAddress.class); |
| 713 | when(addr.getHostAddress()).thenReturn("192.168.1.1"); |
| 714 | mockStatic(InetAddress.class); |
| 715 | PowerMockito.when(InetAddress.getByName("myzkhost")).thenReturn(addr); |
| 716 | |
| 717 | final ZKCallback cb = zk_client.new ZKCallback(); |
| 718 | final byte[] data = "myzkhost:50511".getBytes(CHARSET); |
| 719 | final RegionClient rc = cb.handleRootZnode(data); |
| 720 | assertNotNull(rc); |
| 721 | assertEquals("192.168.1.1:50511", rc.getRemoteAddress()); |
| 722 | verifyPrivate(client).invoke("newClient", "192.168.1.1", 50511); |
| 723 | } |
| 724 | |
| 725 | @Test |
| 726 | public void handleRootZnode90NoPort() throws Exception { |
nothing calls this directly
no test coverage detected