@given(
        discovered_datasets=lists(DISCOVERED_DATASET_STRATEGY).map(
            dataset_map_from_iterable),
    )
    def test_calculates_changes(self, discovered_datasets):
        node_state = NodeState(
            hostname=ScenarioMixin.NODE,
            uuid=ScenarioMixin.NODE_UUID,
            applications=None,
        )
        node_config = to_node(node_state)

        assert_calculated_changes_for_deployer(
            self, self.deployer,
            node_state=node_state,
            node_config=node_config,
            nonmanifest_datasets=[],
            additional_node_states=set(),
            additional_node_config=set(),
            expected_changes=self.expected_change,
            local_state=self.local_state.transform(
                ["datasets"], discovered_datasets,
            ),
        )
        self.assertEqual(
            self.deployer.calculator.discovered_datasets,
            discovered_datasets,
        )
``BlockDeviceDeployer.calculate_changes`` returns the changes
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/test/test_blockdevice.py/BlockDeviceDeployerCalculateChangesTests.test_calculates_changes