Summary of the resources in each layer
The following diagram depicts an example of the resources used in all three layers to enable the Given I am a user with the "X" role step method. Specifically:
- Several scenarios reference the step method named Given I am a user with the "X" role.
- The definition for this step method is defined in the AdminSteps class. This class injects ContextFactory, which means it has access to all the implementations known to ContextFactory. The step definition maps the step method to the createUserWithRoleAndSetAsCurrentUser method from the AdminContext interface.
- ContextFactor has every context API injected into it. This allows it to give every step class access to every implementation.
- Implementation details are stored in context APIs. Every context API is comprised of interface/impl pairs. The implementation code is stored in the impls.
- RemoteSmokeTestHelperModule binds every context API interface to its impl. This provides the logic that allows Context Factory to select the correct impl for every context and method referenced by a step method definition.

For more information on extending base configuration context APIs, see Extending context APIs. For more information on creating new context APIs, see Creating context APIs.
