### Question:
DriverTypeAdapters { public static ConsistencyLevel adapt( com.datastax.driver.core.ConsistencyLevel driverConsistency) { return ConsistencyLevel.values()[driverConsistency.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 testShouldAdaptConsistencyLevels() { assertThat(adapt(ConsistencyLevel.ANY)).isEqualTo(ANY); assertThat(adapt(ConsistencyLevel.ONE)).isSameAs(ONE); assertThat(adapt(ConsistencyLevel.TWO)).isSameAs(TWO); assertThat(adapt(ConsistencyLevel.THREE)).isSameAs(THREE); assertThat(adapt(ConsistencyLevel.QUORUM)).isSameAs(QUORUM); assertThat(adapt(ConsistencyLevel.ALL)).isSameAs(ALL); assertThat(adapt(ConsistencyLevel.LOCAL_QUORUM)).isSameAs(LOCAL_QUORUM); assertThat(adapt(ConsistencyLevel.EACH_QUORUM)).isSameAs(EACH_QUORUM); assertThat(adapt(ConsistencyLevel.SERIAL)).isSameAs(SERIAL); assertThat(adapt(ConsistencyLevel.LOCAL_SERIAL)).isSameAs(LOCAL_SERIAL); assertThat(adapt(ConsistencyLevel.LOCAL_ONE)).isSameAs(LOCAL_ONE); }
@Test public void testShouldAdaptWriteTypes() { assertThat(adapt(WriteType.SIMPLE)).isSameAs(SIMPLE); assertThat(adapt(WriteType.BATCH)).isSameAs(BATCH); assertThat(adapt(WriteType.UNLOGGED_BATCH)).isSameAs(UNLOGGED_BATCH); assertThat(adapt(WriteType.COUNTER)).isSameAs(COUNTER); assertThat(adapt(WriteType.BATCH_LOG)).isSameAs(BATCH_LOG); assertThat(adapt(WriteType.CAS)).isSameAs(CAS); }