MetaDataRefreshStrategyFactory { public static Optional<MetaDataRefreshStrategy> newInstance(final SQLStatementContext<?> sqlStatementContext) { return Optional.ofNullable(REGISTRY.get(sqlStatementContext.getClass())); }  static Optional<MetaDataRefreshStrategy> newInstance(final SQLStatementContext<?> sqlStatementContext);  }
@Test public void assertNewInstance() { assertTrue(MetaDataRefreshStrategyFactory.newInstance(createTableStatementContext).isPresent()); assertTrue(MetaDataRefreshStrategyFactory.newInstance(createIndexStatementContext).isPresent()); assertFalse(MetaDataRefreshStrategyFactory.newInstance(alterIndexStatementContext).isPresent()); assertTrue(MetaDataRefreshStrategyFactory.newInstance(alterTableStatementContext).isPresent()); assertTrue(MetaDataRefreshStrategyFactory.newInstance(dropIndexStatementContext).isPresent()); assertTrue(MetaDataRefreshStrategyFactory.newInstance(dropTableStatementContext).isPresent()); assertFalse(MetaDataRefreshStrategyFactory.newInstance(truncateStatementContext).isPresent()); }