class TrainModel implements UseCase {

    @Override
    public void execute() {
        if (model == null) {
            callback.onError(new UseCaseError());
        } else {
            model.buildModel();
            model.train(dataSource);
            callback.onSuccess(Boolean.TRUE);
        }
    }

    public  TrainModel(FederatedModel model, FederatedDataSet dataSource,
                      UseCaseCallback<Boolean> callback);

}