BusinessCentralDMODataManagementStrategy extends AbstractDMODataManagementStrategy { protected Callback<ModelField[]> fieldCompletionsCallback(String factName, Map<String, String> superTypeMap, Callback<FactModelTree> aggregatorCallback) { return result -> fieldCompletionsCallbackMethod(factName, superTypeMap, result, aggregatorCallback); } BusinessCentralDMODataManagementStrategy(final AsyncPackageDataModelOracleFactory oracleFactory); @Override void manageScenarioSimulationModelContent(ObservablePath currentPath, ScenarioSimulationModelContent toManage); @Override boolean isADataType(String value); AsyncPackageDataModelOracle getOracle();  }
@Test public void fieldCompletionsCallback() { ModelField[] result = {}; Map<String, String> superTypesMap = Collections.emptyMap(); Callback<FactModelTree> aggregatorCallbackMock = mock(Callback.class); Callback<ModelField[]> returnCallback = businessCentralDmoDataManagementStrategySpy.fieldCompletionsCallback(TestProperties.FACT_NAME, superTypesMap, aggregatorCallbackMock); returnCallback.callback(result); verify(businessCentralDmoDataManagementStrategySpy, times(1)).fieldCompletionsCallbackMethod(eq(TestProperties.FACT_NAME), eq(superTypesMap), eq(result), eq(aggregatorCallbackMock)); }