From 8c7a6874d671f6b1faa9d3b4a08a6b0600610d2e Mon Sep 17 00:00:00 2001 From: Paul Highum Date: Thu, 16 Jun 2022 14:33:49 -0700 Subject: [PATCH] INS-91: fixes tests for new jackson version --- .../orm/AbstractBigTableEntityDaoTest.java | 48 ++++--- .../orm/BigTableEntityAsyncDaoTest.java | 129 +++++++++--------- .../bigtable/orm/BigTableEntityDaoTest.java | 95 ++++++------- 3 files changed, 143 insertions(+), 129 deletions(-) diff --git a/core/src/test/java/com/bettercloud/bigtable/orm/AbstractBigTableEntityDaoTest.java b/core/src/test/java/com/bettercloud/bigtable/orm/AbstractBigTableEntityDaoTest.java index 9cc4719..cbdd586 100644 --- a/core/src/test/java/com/bettercloud/bigtable/orm/AbstractBigTableEntityDaoTest.java +++ b/core/src/test/java/com/bettercloud/bigtable/orm/AbstractBigTableEntityDaoTest.java @@ -92,21 +92,25 @@ public int hashCode() { } } - enum TestColumns implements Column { - - STRING_VALUE("stringValueFamily", "stringValueQualifier", new TypeReference() { - }, false), - BOOLEAN_VALUE("booleanValueFamily", "booleanValueQualifier", new TypeReference() { - }, false), - NESTED_OBJECT("nestedObjectFamily", "nestedObjectQualifier", new TypeReference() { - }, false); - + static class TestColumns implements Column { + + public static final TestColumns STRING_VALUE = new TestColumns<>( + "stringValueFamily", "stringValueQualifier", new TypeReference() {}, false); + public static final TestColumns BOOLEAN_VALUE = new TestColumns<>( + "booleanValueFamily", "booleanValueQualifier", new TypeReference() {}, false); + public static final TestColumns NESTED_OBJECT = new TestColumns<>( + "nestedObjectFamily", "nestedObjectQualifier", new TypeReference() {}, false); private final String family; private final String qualifier; - private final TypeReference typeReference; + + private final TypeReference typeReference; private final boolean isVersioned; - TestColumns(final String family, final String qualifier, final TypeReference typeReference, final boolean isVersioned) { + TestColumns( + final String family, + final String qualifier, + final TypeReference typeReference, + final boolean isVersioned) { this.family = family; this.qualifier = qualifier; this.typeReference = typeReference; @@ -128,6 +132,10 @@ public TypeReference getTypeReference() { return typeReference; } + public TypeReference getTestTypeReference() { + return typeReference; + } + @Override public boolean isVersioned() { return isVersioned; @@ -237,19 +245,19 @@ public int hashCode() { } } - enum TestVersionedColumns implements Column { + static class TestVersionedColumns implements Column { - STRING_VALUE("stringValueFamily", "stringValueQualifier", new TypeReference() { - }, false), - VERSIONED_BOOLEAN_VALUE("versionedBooleanValueFamily", "versionedBooleanValueQualifier", new TypeReference() { - }, true); + public static final TestColumns STRING_VALUE = new TestColumns<>( + "stringValueFamily", "stringValueQualifier", new TypeReference() {}, false); + public static final TestColumns VERSIONED_BOOLEAN_VALUE = new TestColumns<>( + "versionedBooleanValueFamily", "versionedBooleanValueQualifier", new TypeReference() {}, true); private final String family; private final String qualifier; - private final TypeReference typeReference; + private final TypeReference typeReference; private final boolean isVersioned; - TestVersionedColumns(final String family, final String qualifier, final TypeReference typeReference, final boolean isVersioned) { + TestVersionedColumns(final String family, final String qualifier, final TypeReference typeReference, final boolean isVersioned) { this.family = family; this.qualifier = qualifier; this.typeReference = typeReference; @@ -271,6 +279,10 @@ public TypeReference getTypeReference() { return typeReference; } + public TypeReference getTestTypeReference() { + return typeReference; + } + @Override public boolean isVersioned() { return isVersioned; diff --git a/core/src/test/java/com/bettercloud/bigtable/orm/BigTableEntityAsyncDaoTest.java b/core/src/test/java/com/bettercloud/bigtable/orm/BigTableEntityAsyncDaoTest.java index 8166a6b..da85e66 100644 --- a/core/src/test/java/com/bettercloud/bigtable/orm/BigTableEntityAsyncDaoTest.java +++ b/core/src/test/java/com/bettercloud/bigtable/orm/BigTableEntityAsyncDaoTest.java @@ -14,6 +14,7 @@ import org.apache.hadoop.hbase.filter.PageFilter; import org.apache.hadoop.hbase.filter.RowFilter; import org.apache.hadoop.hbase.util.Bytes; +import com.google.common.collect.Lists; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; @@ -54,13 +55,13 @@ public class BigTableEntityAsyncDaoTest extends AbstractBigTableEntityDaoTest { @Mock private AsyncTable table; - private final List columns = Arrays.asList(TestColumns.values()); + private final List columns = Lists.newArrayList(TestColumns.BOOLEAN_VALUE, TestColumns.STRING_VALUE, TestColumns.NESTED_OBJECT); private final Supplier entityFactory = TestEntity::new; private final Function> delegateFactory = TestDelegate::new; - private final List versionedColumns = Arrays.asList(TestVersionedColumns.values()); + private final List versionedColumns = Lists.newArrayList(TestVersionedColumns.STRING_VALUE, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE); private final Supplier versionedEntityFactory = TestVersionedEntity::new; @@ -162,7 +163,7 @@ public void testGetRetrievesAllColumns() throws IOException, ExecutionException, when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -176,7 +177,7 @@ public void testGetRetrievesAllColumns() throws IOException, ExecutionException, when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -190,7 +191,7 @@ public void testGetRetrievesAllColumns() throws IOException, ExecutionException, when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.get(any(Get.class))).thenReturn(CompletableFuture.completedFuture(result)); @@ -227,7 +228,7 @@ public void testGetRetrievesNullValues() throws IOException, ExecutionException, when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -241,7 +242,7 @@ public void testGetRetrievesNullValues() throws IOException, ExecutionException, when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -253,7 +254,7 @@ public void testGetRetrievesNullValues() throws IOException, ExecutionException, when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.get(any(Get.class))).thenReturn(CompletableFuture.completedFuture(result)); @@ -319,7 +320,7 @@ public void testGetRetrievesVersionedValuesAndTimestamps() throws IOException, E when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -334,7 +335,7 @@ public void testGetRetrievesVersionedValuesAndTimestamps() throws IOException, E when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); when(table.get(any(Get.class))).thenReturn(CompletableFuture.completedFuture(result)); @@ -668,7 +669,7 @@ public void testGetKeysRetrievesAllColumns() throws IOException, ExecutionExcept when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -682,7 +683,7 @@ public void testGetKeysRetrievesAllColumns() throws IOException, ExecutionExcept when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -696,7 +697,7 @@ public void testGetKeysRetrievesAllColumns() throws IOException, ExecutionExcept when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.get(anyList())).thenReturn(Collections.singletonList(CompletableFuture.completedFuture(result))); @@ -739,7 +740,7 @@ public void testGetKeysRetrievesAllColumnsForMultipleKeys() throws IOException, when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell1); - when(objectMapper.readValue(stringValueBytes1, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes1, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue1); final Cell booleanValueCell1 = mock(Cell.class); @@ -753,7 +754,7 @@ public void testGetKeysRetrievesAllColumnsForMultipleKeys() throws IOException, when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell1); - when(objectMapper.readValue(booleanValueBytes1, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes1, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue1); final Cell nestedObjectCell1 = mock(Cell.class); @@ -767,7 +768,7 @@ public void testGetKeysRetrievesAllColumnsForMultipleKeys() throws IOException, when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell1); - when(objectMapper.readValue(nestedObjectBytes1, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes1, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject1); final String stringValue2 = "some other string"; @@ -791,7 +792,7 @@ public void testGetKeysRetrievesAllColumnsForMultipleKeys() throws IOException, when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell2); - when(objectMapper.readValue(stringValueBytes2, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes2, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue2); final Cell booleanValueCell2 = mock(Cell.class); @@ -805,7 +806,7 @@ public void testGetKeysRetrievesAllColumnsForMultipleKeys() throws IOException, when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell2); - when(objectMapper.readValue(booleanValueBytes2, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes2, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue2); final Cell nestedObjectCell2 = mock(Cell.class); @@ -819,7 +820,7 @@ public void testGetKeysRetrievesAllColumnsForMultipleKeys() throws IOException, when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell2); - when(objectMapper.readValue(nestedObjectBytes2, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes2, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject2); final Key key1 = new StringKey<>("key1"); @@ -880,7 +881,7 @@ public void testGetKeysRetrievesNullValues() throws IOException, ExecutionExcept when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -894,7 +895,7 @@ public void testGetKeysRetrievesNullValues() throws IOException, ExecutionExcept when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -906,7 +907,7 @@ public void testGetKeysRetrievesNullValues() throws IOException, ExecutionExcept when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.get(anyList())).thenReturn(Collections.singletonList(CompletableFuture.completedFuture(result))); @@ -983,7 +984,7 @@ public void testGetKeysRetrievesVersionedValuesAndTimestamps() throws IOExceptio when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -998,7 +999,7 @@ public void testGetKeysRetrievesVersionedValuesAndTimestamps() throws IOExceptio when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); when(table.get(anyList())).thenReturn(Collections.singletonList(CompletableFuture.completedFuture(result))); @@ -1370,7 +1371,7 @@ public void testGetAllRetrievesAllColumns() throws IOException, ExecutionExcepti when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -1384,7 +1385,7 @@ public void testGetAllRetrievesAllColumns() throws IOException, ExecutionExcepti when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -1398,7 +1399,7 @@ public void testGetAllRetrievesAllColumns() throws IOException, ExecutionExcepti when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.getAll(anyList())).thenReturn(CompletableFuture.completedFuture(Collections.singletonList(result))); @@ -1441,7 +1442,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException, E when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell1); - when(objectMapper.readValue(stringValueBytes1, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes1, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue1); final Cell booleanValueCell1 = mock(Cell.class); @@ -1455,7 +1456,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException, E when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell1); - when(objectMapper.readValue(booleanValueBytes1, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes1, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue1); final Cell nestedObjectCell1 = mock(Cell.class); @@ -1469,7 +1470,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException, E when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell1); - when(objectMapper.readValue(nestedObjectBytes1, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes1, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject1); final String stringValue2 = "some other string"; @@ -1493,7 +1494,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException, E when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell2); - when(objectMapper.readValue(stringValueBytes2, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes2, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue2); final Cell booleanValueCell2 = mock(Cell.class); @@ -1507,7 +1508,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException, E when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell2); - when(objectMapper.readValue(booleanValueBytes2, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes2, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue2); final Cell nestedObjectCell2 = mock(Cell.class); @@ -1521,7 +1522,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException, E when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell2); - when(objectMapper.readValue(nestedObjectBytes2, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes2, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject2); final Key key1 = new StringKey<>("key1"); @@ -1584,7 +1585,7 @@ public void testGetAllRetrievesNullValues() throws IOException, ExecutionExcepti when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -1598,7 +1599,7 @@ public void testGetAllRetrievesNullValues() throws IOException, ExecutionExcepti when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -1610,7 +1611,7 @@ public void testGetAllRetrievesNullValues() throws IOException, ExecutionExcepti when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.getAll(anyList())).thenReturn(CompletableFuture.completedFuture(Collections.singletonList(result))); @@ -1688,7 +1689,7 @@ public void testGetAllRetrievesVersionedValuesAndTimestamps() throws IOException when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -1703,7 +1704,7 @@ public void testGetAllRetrievesVersionedValuesAndTimestamps() throws IOException when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); when(table.getAll(anyList())).thenReturn(CompletableFuture.completedFuture(Collections.singletonList(result))); @@ -2050,7 +2051,7 @@ public void testScanIOExceptionWrappedInExecutionException() throws Throwable { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenThrow(new IOException()); final Cell booleanValueCell = mock(Cell.class); @@ -2064,7 +2065,7 @@ public void testScanIOExceptionWrappedInExecutionException() throws Throwable { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -2078,7 +2079,7 @@ public void testScanIOExceptionWrappedInExecutionException() throws Throwable { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.scanAll(any(Scan.class))).thenReturn(CompletableFuture.completedFuture(Collections.singletonList(result))); @@ -2123,7 +2124,7 @@ public void testScanRetrievesAllColumns() throws IOException, ExecutionException when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -2137,7 +2138,7 @@ public void testScanRetrievesAllColumns() throws IOException, ExecutionException when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -2151,7 +2152,7 @@ public void testScanRetrievesAllColumns() throws IOException, ExecutionException when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.scanAll(any(Scan.class))).thenReturn(CompletableFuture.completedFuture(Collections.singletonList(result))); @@ -2197,7 +2198,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException, Exe when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell1); - when(objectMapper.readValue(stringValueBytes1, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes1, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue1); final Cell booleanValueCell1 = mock(Cell.class); @@ -2211,7 +2212,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException, Exe when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell1); - when(objectMapper.readValue(booleanValueBytes1, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes1, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue1); final Cell nestedObjectCell1 = mock(Cell.class); @@ -2225,7 +2226,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException, Exe when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell1); - when(objectMapper.readValue(nestedObjectBytes1, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes1, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject1); final String stringValue2 = "some other string"; @@ -2250,7 +2251,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException, Exe when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell2); - when(objectMapper.readValue(stringValueBytes2, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes2, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue2); final Cell booleanValueCell2 = mock(Cell.class); @@ -2264,7 +2265,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException, Exe when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell2); - when(objectMapper.readValue(booleanValueBytes2, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes2, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue2); final Cell nestedObjectCell2 = mock(Cell.class); @@ -2278,7 +2279,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException, Exe when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell2); - when(objectMapper.readValue(nestedObjectBytes2, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes2, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject2); when(table.scanAll(any(Scan.class))).thenReturn(CompletableFuture.completedFuture(Arrays.asList(result1, result2))); @@ -2327,7 +2328,7 @@ public void testScanRetrievesNullValues() throws IOException, ExecutionException when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -2341,7 +2342,7 @@ public void testScanRetrievesNullValues() throws IOException, ExecutionException when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -2353,7 +2354,7 @@ public void testScanRetrievesNullValues() throws IOException, ExecutionException when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.scanAll(any(Scan.class))).thenReturn(CompletableFuture.completedFuture(Collections.singletonList(result))); @@ -2434,7 +2435,7 @@ public void testScanRetrievesVersionedValuesAndTimestamps() throws IOException, when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -2449,7 +2450,7 @@ public void testScanRetrievesVersionedValuesAndTimestamps() throws IOException, when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); when(table.scanAll(any(Scan.class))).thenReturn(CompletableFuture.completedFuture(Collections.singletonList(result))); @@ -2776,7 +2777,7 @@ public void testScanRowFiltersOnConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -2790,7 +2791,7 @@ public void testScanRowFiltersOnConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -2804,7 +2805,7 @@ public void testScanRowFiltersOnConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.scanAll(scanArgumentCaptor.capture())).thenReturn(CompletableFuture.completedFuture(Collections.singletonList(result))); @@ -2854,7 +2855,7 @@ public void testScanDoesNotRowFiltersOnEmptyConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -2868,7 +2869,7 @@ public void testScanDoesNotRowFiltersOnEmptyConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -2882,7 +2883,7 @@ public void testScanDoesNotRowFiltersOnEmptyConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.scanAll(scanArgumentCaptor.capture())).thenReturn(CompletableFuture.completedFuture(Collections.singletonList(result))); @@ -2927,7 +2928,7 @@ public void testScanDoesNotRowFiltersOnNullConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -2941,7 +2942,7 @@ public void testScanDoesNotRowFiltersOnNullConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -2955,7 +2956,7 @@ public void testScanDoesNotRowFiltersOnNullConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.scanAll(scanArgumentCaptor.capture())).thenReturn(CompletableFuture.completedFuture(Collections.singletonList(result))); diff --git a/core/src/test/java/com/bettercloud/bigtable/orm/BigTableEntityDaoTest.java b/core/src/test/java/com/bettercloud/bigtable/orm/BigTableEntityDaoTest.java index 710dc2d..7fb560f 100644 --- a/core/src/test/java/com/bettercloud/bigtable/orm/BigTableEntityDaoTest.java +++ b/core/src/test/java/com/bettercloud/bigtable/orm/BigTableEntityDaoTest.java @@ -14,6 +14,7 @@ import org.apache.hadoop.hbase.filter.PageFilter; import org.apache.hadoop.hbase.filter.RowFilter; import org.apache.hadoop.hbase.util.Bytes; +import com.google.common.collect.Lists; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; @@ -57,13 +58,13 @@ public class BigTableEntityDaoTest extends AbstractBigTableEntityDaoTest { @Mock private ResultScanner scanner; - private final List columns = Arrays.asList(TestColumns.values()); + private final List columns = Lists.newArrayList(TestColumns.BOOLEAN_VALUE, TestColumns.STRING_VALUE, TestColumns.NESTED_OBJECT); private final Supplier entityFactory = TestEntity::new; private final Function> delegateFactory = TestDelegate::new; - private final List versionedColumns = Arrays.asList(TestVersionedColumns.values()); + private final List versionedColumns = Lists.newArrayList(TestVersionedColumns.STRING_VALUE, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE); private final Supplier versionedEntityFactory = TestVersionedEntity::new; @@ -124,7 +125,7 @@ public void testGetRetrievesAllColumns() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -138,7 +139,7 @@ public void testGetRetrievesAllColumns() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -152,7 +153,7 @@ public void testGetRetrievesAllColumns() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.get(anyList())).thenReturn(new Result[] { result }); @@ -189,7 +190,7 @@ public void testGetRetrievesNullValues() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -203,7 +204,7 @@ public void testGetRetrievesNullValues() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -215,7 +216,7 @@ public void testGetRetrievesNullValues() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.get(anyList())).thenReturn(new Result[] { result }); @@ -281,7 +282,7 @@ public void testGetRetrievesVersionedValuesAndTimestamps() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -296,7 +297,7 @@ public void testGetRetrievesVersionedValuesAndTimestamps() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); when(table.get(anyList())).thenReturn(new Result[] { result }); @@ -589,7 +590,7 @@ public void testGetAllRetrievesAllColumns() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -603,7 +604,7 @@ public void testGetAllRetrievesAllColumns() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -617,7 +618,7 @@ public void testGetAllRetrievesAllColumns() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.get(anyList())).thenReturn(new Result[] { result }); @@ -657,7 +658,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException { when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell1); - when(objectMapper.readValue(stringValueBytes1, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes1, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue1); final Cell booleanValueCell1 = mock(Cell.class); @@ -671,7 +672,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException { when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell1); - when(objectMapper.readValue(booleanValueBytes1, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes1, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue1); final Cell nestedObjectCell1 = mock(Cell.class); @@ -685,7 +686,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException { when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell1); - when(objectMapper.readValue(nestedObjectBytes1, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes1, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject1); final String stringValue2 = "some other string"; @@ -709,7 +710,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException { when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell2); - when(objectMapper.readValue(stringValueBytes2, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes2, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue2); final Cell booleanValueCell2 = mock(Cell.class); @@ -723,7 +724,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException { when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell2); - when(objectMapper.readValue(booleanValueBytes2, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes2, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue2); final Cell nestedObjectCell2 = mock(Cell.class); @@ -737,7 +738,7 @@ public void testGetAllRetrievesAllColumnsForMultipleKeys() throws IOException { when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell2); - when(objectMapper.readValue(nestedObjectBytes2, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes2, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject2); final Key key1 = new StringKey<>("key1"); @@ -796,7 +797,7 @@ public void testGetAllRetrievesNullValues() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -810,7 +811,7 @@ public void testGetAllRetrievesNullValues() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -822,7 +823,7 @@ public void testGetAllRetrievesNullValues() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.get(anyList())).thenReturn(new Result[] { result }); @@ -892,7 +893,7 @@ public void testGetAllRetrievesVersionedValuesAndTimestamps() throws IOException when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -907,7 +908,7 @@ public void testGetAllRetrievesVersionedValuesAndTimestamps() throws IOException when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); when(table.get(anyList())).thenReturn(new Result[] { result }); @@ -1226,7 +1227,7 @@ public void testScanRetrievesAllColumns() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -1240,7 +1241,7 @@ public void testScanRetrievesAllColumns() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -1254,7 +1255,7 @@ public void testScanRetrievesAllColumns() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.getScanner(any(Scan.class))).thenReturn(scanner); @@ -1309,7 +1310,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException { when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell1); - when(objectMapper.readValue(stringValueBytes1, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes1, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue1); final Cell booleanValueCell1 = mock(Cell.class); @@ -1323,7 +1324,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException { when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell1); - when(objectMapper.readValue(booleanValueBytes1, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes1, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue1); final Cell nestedObjectCell1 = mock(Cell.class); @@ -1337,7 +1338,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException { when(result1.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell1); - when(objectMapper.readValue(nestedObjectBytes1, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes1, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject1); final String stringValue2 = "some other string"; @@ -1362,7 +1363,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException { when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell2); - when(objectMapper.readValue(stringValueBytes2, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes2, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue2); final Cell booleanValueCell2 = mock(Cell.class); @@ -1376,7 +1377,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException { when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell2); - when(objectMapper.readValue(booleanValueBytes2, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes2, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue2); final Cell nestedObjectCell2 = mock(Cell.class); @@ -1390,7 +1391,7 @@ public void testScanRetrievesAllColumnsForMultipleRows() throws IOException { when(result2.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell2); - when(objectMapper.readValue(nestedObjectBytes2, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes2, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject2); when(table.getScanner(any(Scan.class))).thenReturn(scanner); @@ -1453,7 +1454,7 @@ public void testScanRetrievesNullValues() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -1467,7 +1468,7 @@ public void testScanRetrievesNullValues() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -1479,7 +1480,7 @@ public void testScanRetrievesNullValues() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.getScanner(any(Scan.class))).thenReturn(scanner); @@ -1578,7 +1579,7 @@ public void testScanRetrievesVersionedValuesAndTimestamps() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestVersionedColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -1593,7 +1594,7 @@ public void testScanRetrievesVersionedValuesAndTimestamps() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestVersionedColumns.VERSIONED_BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); when(table.getScanner(any(Scan.class))).thenReturn(scanner); @@ -1969,7 +1970,7 @@ public void testScanRowFiltersOnConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -1983,7 +1984,7 @@ public void testScanRowFiltersOnConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -1997,7 +1998,7 @@ public void testScanRowFiltersOnConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.getScanner(scanArgumentCaptor.capture())).thenReturn(scanner); @@ -2060,7 +2061,7 @@ public void testScanDoesNotRowFiltersOnEmptyConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -2074,7 +2075,7 @@ public void testScanDoesNotRowFiltersOnEmptyConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -2088,7 +2089,7 @@ public void testScanDoesNotRowFiltersOnEmptyConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.getScanner(scanArgumentCaptor.capture())).thenReturn(scanner); @@ -2146,7 +2147,7 @@ public void testScanDoesNotRowFiltersOnNullConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.STRING_VALUE.getFamily()), Bytes.toBytes(TestColumns.STRING_VALUE.getQualifier()))).thenReturn(stringValueCell); - when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTypeReference())) + when(objectMapper.readValue(stringValueBytes, TestColumns.STRING_VALUE.getTestTypeReference())) .thenReturn(stringValue); final Cell booleanValueCell = mock(Cell.class); @@ -2160,7 +2161,7 @@ public void testScanDoesNotRowFiltersOnNullConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getFamily()), Bytes.toBytes(TestColumns.BOOLEAN_VALUE.getQualifier()))).thenReturn(booleanValueCell); - when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTypeReference())) + when(objectMapper.readValue(booleanValueBytes, TestColumns.BOOLEAN_VALUE.getTestTypeReference())) .thenReturn(booleanValue); final Cell nestedObjectCell = mock(Cell.class); @@ -2174,7 +2175,7 @@ public void testScanDoesNotRowFiltersOnNullConstant() throws IOException { when(result.getColumnLatestCell(Bytes.toBytes(TestColumns.NESTED_OBJECT.getFamily()), Bytes.toBytes(TestColumns.NESTED_OBJECT.getQualifier()))).thenReturn(nestedObjectCell); - when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTypeReference())) + when(objectMapper.readValue(nestedObjectBytes, TestColumns.NESTED_OBJECT.getTestTypeReference())) .thenReturn(nestedObject); when(table.getScanner(scanArgumentCaptor.capture())).thenReturn(scanner);