made createConstraintsFromDemand protected again, unit tests adapted