### Question:
ThingAgent implements ThingService { @Override public IFuture<JadexContent> writeProperty(String name, JadexContent content) { ExposedThingProperty<Object> property = thing.getProperty(name); try { Object value = ContentManager.contentToValue(content.fromJadex(), property); CompletableFuture<JadexContent> result = property.write(value).thenApply(output -> { try { Content outputContent = ContentManager.valueToContent(output, ContentManager.DEFAULT); return new JadexContent(outputContent); } catch (ContentCodecException e) { log.warn("Unable to write property", e); return null; } }); return FutureConverters.toJadex(result); } catch (ContentCodecException e) { return new Future<>(e); } } ThingAgent();   ThingAgent(IInternalAccess agent, ExposedThing thing); @AgentCreated IFuture<Void> created(); @AgentKilled void killed(); @Override IFuture<String> get(); @Override IFuture<JadexContent> readProperties(); @Override IFuture<JadexContent> readProperty(String name); @Override IFuture<JadexContent> writeProperty(String name, JadexContent content); @Override String getThingServiceId();  }### Answer:
@Test public void writePropertyShouldWriteToGivenProperty() { when(thing.getProperty("count")).thenReturn(property); when(property.write(any())).thenReturn(completedFuture(null)); ThingAgent agent = new ThingAgent(ia, thing); agent.writeProperty("count", jadexContent); verify(property, timeout(1 * 1000L)).write(any()); }