### Question:
HbaseFieldResolver implements FieldResolver { @Override public Object getFieldValue(Field field, Object val) { if (!(val instanceof Result)) { String clazz = (val != null) ? val.getClass().getName() : "null"; throw new IllegalArgumentException("Expected value of type Result but found " + clazz); } byte[] rawFieldValue = ((Result) val).getValue(family, field.getName().getBytes()); return HbaseSchemaUtils.coerceType(isNative, field.getType(), rawFieldValue); } HbaseFieldResolver(boolean isNative, byte[] family); static HbaseFieldResolver resolver(boolean isNative, String family); @Override Object getFieldValue(Field field, Object val);  }### Answer:
@Test public void getFieldValue() { String expectedValue = "myValue"; String family = "family"; Field field = FieldBuilder.newBuilder("field1", Types.MinorType.VARCHAR.getType()).build(); Result mockResult = mock(Result.class); HbaseFieldResolver resolver = HbaseFieldResolver.resolver(false, family); when(mockResult.getValue(any(byte[].class), any(byte[].class))).thenReturn(expectedValue.getBytes()); Object result = resolver.getFieldValue(field, mockResult); assertEquals(expectedValue, result); }