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

Method header092

test/TestRegionClient.java:496–520  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

494 }
495
496 @Test
497 public void header092() throws Exception {
498 RegionClient rclient = mock(RegionClient.class);
499 final byte[] buf = new byte[4 + 1 + 4 + 1 + 44];
500 final String klass = "org.apache.hadoop.hbase.ipc.HRegionInterface";
501 ChannelBuffer header = mock(ChannelBuffer.class);
502
503 PowerMockito.when(rclient, "commonHeader", buf, HRPC3).thenReturn(header);
504 PowerMockito.when(header, "writerIndex").thenReturn(0);
505 PowerMockito.when(rclient, "header092").thenCallRealMethod();
506
507 ChannelBuffer header092 = Whitebox.invokeMethod(rclient, "header092");
508
509 verifyPrivate(rclient, Mockito.atMost(1)).invoke("commonHeader", buf, HRPC3);
510 verifyPrivate(header, Mockito.atMost(2)).invoke("writerIndex");
511 verifyPrivate(header, Mockito.atLeast(1))
512 .invoke("writerIndex", Mockito.anyInt());
513 verifyPrivate(header, Mockito.atMost(1)).invoke("writeByte", klass.length());
514 verifyPrivate(header, Mockito.atMost(1))
515 .invoke("writeBytes", Bytes.ISO88591(klass));
516 verifyPrivate(header, Mockito.atMost(1))
517 .invoke("setInt", Mockito.eq(5), Mockito.anyInt());
518
519 assertNotNull(header092);
520 }
521
522 @Test
523 public void headerCDH3b3() throws Exception {

Callers

nothing calls this directly

Calls 1

ISO88591Method · 0.95

Tested by

no test coverage detected