### Question:
Pql { public static Object getNativeValue(Value value) { return getNativeValue(getApiValue(value)); } private  Pql(); static Value createValue(Object value); static String toString(Value value); static Object getApiValue(Value value); static Object getNativeValue(Value value); static Object getCsvValue(Value value); static List<String[]> resultSetToStringArrayList(ResultSet resultSet); static String resultSetToString(ResultSet resultSet); static List<String> getColumnLabels(ResultSet resultSet); static List<String> getRowStringValues(Row row); static ResultSet combineResultSets(ResultSet first, ResultSet second);  }### Answer:
@Test public void testGetNativeValue() { assertEquals("value1", Pql.getNativeValue(textValue1)); assertEquals(false, Pql.getNativeValue(booleanValue1)); assertEquals(1L, Pql.getNativeValue(numberValue1)); assertEquals(1.02, Pql.getNativeValue(numberValue2)); assertEquals(-1L, Pql.getNativeValue(numberValue3)); assertEquals(null, Pql.getNativeValue(numberValue4)); assertEquals(null, Pql.getNativeValue(numberValue5)); assertEquals( DateTimes.toDateTime(dateTimeValue1.getValue()), Pql.getNativeValue(dateTimeValue1)); assertEquals("2012-12-02", Pql.getNativeValue(dateValue1)); }
@Test @SuppressWarnings("unchecked") public void testGetNativeValue_numberSet() { Set<Object> nativeValue = (Set<Object>) Pql.getNativeValue(numberSetValue); assertTrue(nativeValue.contains(1L)); assertTrue(nativeValue.contains(-1L)); assertEquals(2, nativeValue.size()); }
@Test @SuppressWarnings("unchecked") public void testGetNativeValue_textSet() { Set<Object> nativeValue = (Set<Object>) Pql.getNativeValue(textSetValue); assertTrue(nativeValue.contains("value1")); assertTrue(nativeValue.contains("value2")); assertEquals(2, nativeValue.size()); }
@Test @SuppressWarnings("unchecked") public void testGetNativeValue_commaTextSet() { Set<Object> nativeValue = (Set<Object>) Pql.getNativeValue(commaTextSetValue); assertTrue(nativeValue.contains("value1")); assertTrue(nativeValue.contains("comma,separated")); assertEquals(2, nativeValue.size()); }
@Test @SuppressWarnings("unchecked") public void testGetNativeValue_dateSet() { Set<Object> nativeValue = (Set<Object>) Pql.getNativeValue(dateSetValue); assertTrue(nativeValue.contains("2012-12-02")); assertEquals(1, nativeValue.size()); }
@Test @SuppressWarnings("unchecked") public void testGetNativeValue_dateTimeSet() { Set<Object> nativeValue = (Set<Object>) Pql.getNativeValue(dateTimeSetValue); assertTrue(nativeValue.contains(DateTimes.toDateTime(dateTimeValue1.getValue()))); assertEquals(1, nativeValue.size()); }
@Test public void testGetNativeValue_mixedSet() { thrown.expect(IllegalArgumentException.class); Pql.getNativeValue(mixedSetValue); }
@Test public void testGetNativeValue() { assertEquals("value1", Pql.getNativeValue(textValue1)); assertEquals(false, Pql.getNativeValue(booleanValue1)); assertEquals(1L, Pql.getNativeValue(numberValue1)); assertEquals(1.02, Pql.getNativeValue(numberValue2)); assertEquals( DateTimes.toDateTime(dateTimeValue1.getValue()), Pql.getNativeValue(dateTimeValue1)); assertEquals("2012-12-02", Pql.getNativeValue(dateValue1)); }