### Question:
ThingsAgent implements ThingsService { @Override public IFuture<IExternalAccess> expose(String id) { CreationInfo info = new CreationInfo() .setFilenameClass(ThingAgent.class) .addArgument("thing", things.get(id)); IFuture<IExternalAccess> component = agent.createComponent(info); component.addResultListener(thingAgent -> children.put(id, thingAgent)); return component; } ThingsAgent();   ThingsAgent(IInternalAccess agent,
                Map<String, ExposedThing> things,
                Map<String, IExternalAccess> children); @AgentCreated void created(); @Override IFuture<IExternalAccess> expose(String id); @Override IFuture<Void> destroy(String id);  }### Answer:
@Test public void exposeShouldCreateThingAgent() { when(ia.createComponent(any())).thenReturn(mock(IFuture.class)); ThingsAgent agent = new ThingsAgent(ia, things, children); agent.expose("counter"); verify(ia).createComponent(any()); }