### Question:
Get extends Query implements Row, Comparable<Row> { public Get(byte [] row) { Mutation.checkRow(row); this.row = row; } Get(byte [] row); boolean isCheckExistenceOnly(); void setCheckExistenceOnly(boolean checkExistenceOnly); boolean isClosestRowBefore(); void setClosestRowBefore(boolean closestRowBefore); Get addFamily(byte [] family); Get addColumn(byte [] family, byte [] qualifier); Get setTimeRange(long minStamp, long maxStamp); Get setTimeStamp(long timestamp); Get setMaxVersions(); Get setMaxVersions(int maxVersions); Get setMaxResultsPerColumnFamily(int limit); Get setRowOffsetPerColumnFamily(int offset); @Override Get setFilter(Filter filter); void setCacheBlocks(boolean cacheBlocks); boolean getCacheBlocks(); byte [] getRow(); int getMaxVersions(); int getMaxResultsPerColumnFamily(); int getRowOffsetPerColumnFamily(); TimeRange getTimeRange(); Set<byte[]> familySet(); int numFamilies(); boolean hasFamilies(); Map<byte[],NavigableSet<byte[]>> getFamilyMap(); @Override Map<String, Object> getFingerprint(); @Override Map<String, Object> toMap(int maxCols); @Override int compareTo(Row other); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testDynamicFilter() throws Exception { Configuration conf = HBaseConfiguration.create(); String localPath = conf.get("hbase.local.dir") + File.separator + "jars" + File.separator; File jarFile = new File(localPath, "MockFilter.jar"); jarFile.delete(); assertFalse("Should be deleted: " + jarFile.getPath(), jarFile.exists()); ClientProtos.Get getProto1 = ClientProtos.Get.parseFrom(Base64.decode(PB_GET)); ClientProtos.Get getProto2 = ClientProtos.Get.parseFrom(Base64.decode(PB_GET_WITH_FILTER_LIST)); try { ProtobufUtil.toGet(getProto1); fail("Should not be able to load the filter class"); } catch (IOException ioe) { assertTrue(ioe.getCause() instanceof ClassNotFoundException); } try { ProtobufUtil.toGet(getProto2); fail("Should not be able to load the filter class"); } catch (IOException ioe) { assertTrue(ioe.getCause() instanceof InvocationTargetException); InvocationTargetException ite = (InvocationTargetException)ioe.getCause(); assertTrue(ite.getTargetException() instanceof DeserializationException); } FileOutputStream fos = new FileOutputStream(jarFile); fos.write(Base64.decode(MOCK_FILTER_JAR)); fos.close(); Get get1 = ProtobufUtil.toGet(getProto1); assertEquals("test.MockFilter", get1.getFilter().getClass().getName()); Get get2 = ProtobufUtil.toGet(getProto2); assertTrue(get2.getFilter() instanceof FilterList); List<Filter> filters = ((FilterList)get2.getFilter()).getFilters(); assertEquals(3, filters.size()); assertEquals("test.MockFilter", filters.get(0).getClass().getName()); assertEquals("my.MockFilter", filters.get(1).getClass().getName()); assertTrue(filters.get(2) instanceof KeyOnlyFilter); }