ApplicationChange returns an ApplicationChange representing the input state application.
CharmChange returns a CharmChange representing the input state charm.
ModelChange returns a ModelChange representing the input state model.
ModelChangeFromState returns a ModelChange representing the current model for the state object.
UnitChange returns a UnitChange representing the input state unit.
TestController wraps a cache controller for testing. It allows synchronisation of state objects with the cache without the need for a multi-watcher and cache worker. This is useful when testing with StateSuite; JujuConnSuite sets up a cache worker and multiwatcher to keep the model cache in sync, so direct population using this technique is not necessary.
NewTestController returns creates and returns a new test controller with an initial set of matchers for receiving cache event notifications. The controller can be instantiated like this in suite/test setups in order to retain a common set of matchers, but `Init` should be called in each test (see below).
Init instantiates the inner cache controller and sets up event synchronisation based on the input matchers. Changes sent to the cache can be waited on by using the `NextChange` method.
NOTE: It is recommended to perform this initialisation in the actual test method rather than `SetupSuite` or `SetupTest` as different gc.C references are supplied to each of those methods.
NextChange returns the next change processed by the cache that satisfies a matcher, or fails the test with a time-out.
UpdateApplication updates the input state application in the cache.
UpdateCharm updates the input state charm in the cache.
UpdateMachine updates the input state machine in the cache.
UpdateModel updates the current model for the input state in the cache.
UpdateUnit updates the input state unit in the cache.