ModelWriter { public void endObject() { encoder.endObject(); } ModelWriter(final WebsocketEncoder encoder); void beginObject(final PWindow window); void write(final ServerToClientModel model); void write(final ServerToClientModel model, final Object value); void endObject(); PWindow getCurrentWindow();  }
@Test public void testEndObject() { modelWriter.endObject(); Mockito.verify(websocketEncoder).endObject(); }