### Question:
DelegatingIntrinsicSwitchColumnNamingStrategy implements ColumnNamingStrategy { @Override public ColumnNamingSession startColumnNamingSession() { final ColumnNamingSession intrinsicSession = intrinsicStrategy.startColumnNamingSession(); final ColumnNamingSession nonIntrinsicSession = nonIntrinsicStrategy.startColumnNamingSession(); return new ColumnNamingSession() { @Override public String getNextColumnName(ColumnNamingContext ctx) { final String intrinsicColumnName = ctx.getIntrinsicColumnName(); if (intrinsicColumnName == null || intrinsicColumnName.isEmpty()) { return nonIntrinsicSession.getNextColumnName(ctx); } return intrinsicSession.getNextColumnName(ctx); } @Override public void close() { intrinsicSession.close(); nonIntrinsicSession.close(); } }; } DelegatingIntrinsicSwitchColumnNamingStrategy(ColumnNamingStrategy intrinsicStrategy,
            ColumnNamingStrategy nonIntrinsicStrategy); @Override ColumnNamingSession startColumnNamingSession();  }### Answer:
@Test public void testDuplicateColumnNames() throws Exception { try (final ColumnNamingSession session = namingStrategy.startColumnNamingSession()) { assertEquals("foo", session.getNextColumnName(new ColumnNamingContextImpl(null, "foo", 0))); assertEquals("bar", session.getNextColumnName(new ColumnNamingContextImpl(null, "bar", 1))); assertEquals("foo_2", session.getNextColumnName(new ColumnNamingContextImpl(null, "foo", 2))); } }
@Test public void testNoIntrinsicColumnNames() throws Exception { try (final ColumnNamingSession session = namingStrategy.startColumnNamingSession()) { assertEquals("A", session.getNextColumnName(new ColumnNamingContextImpl(null, "", 0))); assertEquals("B", session.getNextColumnName(new ColumnNamingContextImpl(null, null, 1))); assertEquals("C", session.getNextColumnName(new ColumnNamingContextImpl(null, "", 2))); } }