@Test
public void testSelectAdapter() throws Exception {

    // Scenario 1: KNS is not enabled, in this case it will always default to KRAD adapter
    assertEquals(kradLegacyDataAdapter, lda.selectAdapter(NonLegacy.class));
    assertEquals(kradLegacyDataAdapter, lda.selectAdapter(newNonLegacyObject()));
    assertEquals(kradLegacyDataAdapter, lda.selectAdapter(Legacy.class));
    assertEquals(kradLegacyDataAdapter, lda.selectAdapter(newLegacyObject()));
    // Now let's enable the KNS
    enableLegacy();
    // Scenario 2: Using a Class which is a valid legacy Class, should use KNS adapter
    assertEquals(knsLegacyDataAdapter, lda.selectAdapter(Legacy.class));
    // Scenario 3: Using an Object which is a valid legacy Object, should use KNS adapter
    assertEquals(knsLegacyDataAdapter, lda.selectAdapter(newLegacyObject()));
    // Scenario 4: Using a Class which is a not a legacy Class, should fall back to KRAD adapter even though legacy is enabled
    assertEquals(kradLegacyDataAdapter, lda.selectAdapter(NonLegacy.class));
    // Scenario 5: Using an Object which is a not a legacy Object, should fall back to KRAD adapter even though legacy is enabled
    assertEquals(kradLegacyDataAdapter, lda.selectAdapter(newNonLegacyObject()));
}