public static Collection<ExecutionUnit> build(final ShardingSphereDatabase database, final SQLRewriteResult sqlRewriteResult, final SQLStatementContext sqlStatementContext) {
        return sqlRewriteResult instanceof GenericSQLRewriteResult
                ? build(database, (GenericSQLRewriteResult) sqlRewriteResult, sqlStatementContext)
                : build((RouteSQLRewriteResult) sqlRewriteResult);
    }
@Test
    void assertBuildGenericSQLRewriteResult() {
        String sql = "sql";
        GenericSQLRewriteResult genericSQLRewriteResult = new GenericSQLRewriteResult(new SQLRewriteUnit(sql, Collections.singletonList("foo_param")));
        ResourceMetaData resourceMetaData = mock(ResourceMetaData.class);
        String firstDataSourceName = "firstDataSourceName";
        when(resourceMetaData.getAllInstanceDataSourceNames()).thenReturn(Arrays.asList(firstDataSourceName, "lastDataSourceName"));
        RuleMetaData ruleMetaData = new RuleMetaData(Collections.emptyList());
        ShardingSphereDatabase database = new ShardingSphereDatabase(DefaultDatabase.LOGIC_NAME, mock(DatabaseType.class), resourceMetaData, ruleMetaData, buildDatabase());
        Collection<ExecutionUnit> actual = ExecutionContextBuilder.build(database, genericSQLRewriteResult, mock(SQLStatementContext.class));
        Collection<ExecutionUnit> expected = Collections.singletonList(new ExecutionUnit(firstDataSourceName, new SQLUnit(sql, Collections.singletonList("foo_param"))));
        assertThat(actual, is(expected));
    }