### Question:
ConsumedThingProperty extends ThingProperty<T> { public Observable<Optional<T>> observer() throws ConsumedThingException { try { Pair<ProtocolClient, Form> clientAndForm = thing.getClientFor(getForms(), Operation.OBSERVE_PROPERTY); ProtocolClient client = clientAndForm.first(); Form form = clientAndForm.second(); return client.observeResource(form) .map(content -> Optional.ofNullable(ContentManager.contentToValue(content, this))); } catch (ProtocolClientException e) { throw new ConsumedThingException(e); } } ConsumedThingProperty(String name, ThingProperty<T> property, ConsumedThing thing); CompletableFuture<T> read(); CompletableFuture<T> write(T value); Observable<Optional<T>> observer(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }### Answer:
@Test public void subscribeShoulCallUnderlyingClient() throws ConsumedThingException, ProtocolClientException { when(thing.getClientFor(any(List.class), any())).thenReturn(new Pair(client, form)); when(client.writeResource(any(), any())).thenReturn(completedFuture(null)); when(client.observeResource(any())).thenReturn(observable); ConsumedThingProperty<Object> consumedThingProperty = new ConsumedThingProperty<Object>("myProperty", property, thing); consumedThingProperty.observer().subscribe(observer); verify(client).observeResource(any()); }