Test a get that queries by family string @throws Exception
()
| 114 | * @throws Exception |
| 115 | */ |
| 116 | @Test |
| 117 | public void getWithFamilyString() throws Exception{ |
| 118 | final GetRequest get = new GetRequest(new String(TABLE), new String(KEY), |
| 119 | new String(FAMILY)); |
| 120 | final ArrayList<KeyValue> row = new ArrayList<KeyValue>(1); |
| 121 | row.add(KV); |
| 122 | when(regionclient.isAlive()).thenReturn(true); |
| 123 | doAnswer(new Answer<Object>() { |
| 124 | public Object answer(final InvocationOnMock invocation) { |
| 125 | get.getDeferred().callback(row); |
| 126 | return null; |
| 127 | } |
| 128 | }).when(regionclient).sendRpc(get); |
| 129 | assertSame(row, client.get(get).joinUninterruptibly()); |
| 130 | } |
| 131 | |
| 132 | /** |
| 133 | * Test a get that queries by family string and qualifier string |