MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / before

Method before

test/BaseTestSecureRpcHelper.java:78–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76 protected SaslClient sasl_client;
77
78 @SuppressWarnings("unchecked")
79 @Before
80 public void before() throws Exception {
81 config = new Config();
82 client = mock(HBaseClient.class);
83 region_client = mock(RegionClient.class);
84 remote_endpoint = new InetSocketAddress("127.0.0.1", 50512);
85 kerberos_provider = mock(KerberosClientAuthProvider.class);
86 sasl_client = mock(SaslClient.class);
87
88 when(client.getConfig()).thenReturn(config);
89 PowerMockito.whenNew(KerberosClientAuthProvider.class).withAnyArguments()
90 .thenReturn(kerberos_provider);
91 when(kerberos_provider.newSaslClient(anyString(), anyMap()))
92 .thenReturn(sasl_client);
93 }
94
95 /**
96 * Super basic implementation of the SecureRpcHelper for unit testing

Callers

nothing calls this directly

Calls 2

getConfigMethod · 0.80
newSaslClientMethod · 0.45

Tested by

no test coverage detected