### Question:
DriverTypeAdapters { public static com.datastax.driver.core.ConsistencyLevel extract( ConsistencyLevel consistencyLevel) { return com.datastax.driver.core.ConsistencyLevel.values()[consistencyLevel.ordinal()]; }  static ConsistencyLevel adapt(
      com.datastax.driver.core.ConsistencyLevel driverConsistency); static com.datastax.driver.core.ConsistencyLevel extract(
      ConsistencyLevel consistencyLevel); static WriteType adapt(com.datastax.driver.core.WriteType driverWriteType); static com.datastax.driver.core.WriteType extract(WriteType writeType);  }### Answer:
@Test public void testShouldExtractConsistencyLevels() { assertThat(extract(ANY)).isEqualTo(ConsistencyLevel.ANY); assertThat(extract(ONE)).isSameAs(ConsistencyLevel.ONE); assertThat(extract(TWO)).isSameAs(ConsistencyLevel.TWO); assertThat(extract(THREE)).isSameAs(ConsistencyLevel.THREE); assertThat(extract(QUORUM)).isSameAs(ConsistencyLevel.QUORUM); assertThat(extract(ALL)).isSameAs(ConsistencyLevel.ALL); assertThat(extract(LOCAL_QUORUM)).isSameAs(ConsistencyLevel.LOCAL_QUORUM); assertThat(extract(EACH_QUORUM)).isSameAs(ConsistencyLevel.EACH_QUORUM); assertThat(extract(SERIAL)).isSameAs(ConsistencyLevel.SERIAL); assertThat(extract(LOCAL_SERIAL)).isSameAs(ConsistencyLevel.LOCAL_SERIAL); assertThat(extract(LOCAL_ONE)).isSameAs(ConsistencyLevel.LOCAL_ONE); }
@Test public void testShouldExtractWriteTypes() { assertThat(extract(SIMPLE)).isSameAs(WriteType.SIMPLE); assertThat(extract(BATCH)).isSameAs(WriteType.BATCH); assertThat(extract(UNLOGGED_BATCH)).isSameAs(WriteType.UNLOGGED_BATCH); assertThat(extract(COUNTER)).isSameAs(WriteType.COUNTER); assertThat(extract(BATCH_LOG)).isSameAs(WriteType.BATCH_LOG); assertThat(extract(CAS)).isSameAs(WriteType.CAS); }