()
| 78 | private SecureRpcHelper94 helper; |
| 79 | |
| 80 | @Before |
| 81 | public void beforeLocal() throws Exception { |
| 82 | channel = mock(Channel.class); |
| 83 | |
| 84 | when(kerberos_provider.getAuthMethodCode()) |
| 85 | .thenReturn(ClientAuthProvider.KEBEROS_CLIENT_AUTH_CODE); |
| 86 | when(kerberos_provider.getClientUsername()).thenReturn("Eskarina"); |
| 87 | |
| 88 | when(sasl_client.hasInitialResponse()).thenReturn(true); |
| 89 | |
| 90 | PowerMockito.mockStatic(Channels.class); |
| 91 | PowerMockito.doAnswer(new Answer<Void>() { |
| 92 | @Override |
| 93 | public Void answer(final InvocationOnMock invocation) throws Throwable { |
| 94 | if (buffers == null) { |
| 95 | buffers = new ArrayList<ChannelBuffer>(2); |
| 96 | } |
| 97 | buffers.add((ChannelBuffer)invocation.getArguments()[1]); |
| 98 | return null; |
| 99 | } |
| 100 | }).when(Channels.class); |
| 101 | Channels.write(any(Channel.class), any(ChannelBuffer.class)); |
| 102 | |
| 103 | config.overrideConfig(SecureRpcHelper.SECURITY_AUTHENTICATION_KEY, |
| 104 | "kerberos"); |
| 105 | helper = new SecureRpcHelper94(client, region_client, remote_endpoint); |
| 106 | } |
| 107 | |
| 108 | @Test |
| 109 | public void ctorKerberos() throws Exception { |
nothing calls this directly
no test coverage detected