@Test public void registerRPCInterfaceTest() { AbstractClientConnector mock = mock(AbstractClientConnector.class); ServerRpcMock implementation = new ServerRpcMock(); Mockito.doCallRealMethod().when(mock).registerRpc(implementation); mock.registerRpc(implementation); verify(mock, times(1)).registerRpc(implementation, ClickRpc.class); }
protected <T extends ServerRpc> void registerRpc(T implementation, Class<T> rpcInterfaceType) { rpcManagerMap.put(rpcInterfaceType.getName(), new ServerRpcManager<T>( implementation, rpcInterfaceType)); }
AbstractClientConnector implements ClientConnector,
        MethodEventSource { protected <T extends ServerRpc> void registerRpc(T implementation, Class<T> rpcInterfaceType) { rpcManagerMap.put(rpcInterfaceType.getName(), new ServerRpcManager<T>( implementation, rpcInterfaceType)); } }
AbstractClientConnector implements ClientConnector,
        MethodEventSource { protected <T extends ServerRpc> void registerRpc(T implementation, Class<T> rpcInterfaceType) { rpcManagerMap.put(rpcInterfaceType.getName(), new ServerRpcManager<T>( implementation, rpcInterfaceType)); }  }
AbstractClientConnector implements ClientConnector,
        MethodEventSource { protected <T extends ServerRpc> void registerRpc(T implementation, Class<T> rpcInterfaceType) { rpcManagerMap.put(rpcInterfaceType.getName(), new ServerRpcManager<T>( implementation, rpcInterfaceType)); }  @Override void addAttachListener(AttachListener listener); @Override void removeAttachListener(AttachListener listener); Flow<AttachEvent> attachEvents(); @Override void addDetachListener(DetachListener listener); @Override void removeDetachListener(DetachListener listener); Flow<DetachEvent> detachEvents(); @Deprecated @Override void requestRepaint(); @Override void markAsDirty(); @Override JsonObject encodeState(); @Override Class<? extends SharedState> getStateType(); @Override ServerRpcManager<?> getRpcManager(String rpcInterfaceName); @Override List<ClientMethodInvocation> retrievePendingRpcCalls(); @Override String getConnectorId(); @Override UI getUI(); @Override @Deprecated void requestRepaintAll(); @Override void markAsDirtyRecursive(); static Iterable<? extends ClientConnector> getAllChildrenIterable(
            final ClientConnector connector); @Override Collection<Extension> getExtensions(); @Override void removeExtension(Extension extension); @Override boolean isAttached(); @Override void attach(); @Override void detach(); @Override boolean isConnectorEnabled(); @Override void beforeClientResponse(boolean initial); @Override boolean handleConnectorRequest(VaadinRequest request,
            VaadinResponse response, String path); @Deprecated @Override void addListener(Class<?> eventType, Object target, Method method); @Override @Deprecated void removeListener(Class<?> eventType, Object target); @Override @Deprecated void removeListener(Class<?> eventType, Object target,
            Method method); @Deprecated Collection<?> getListeners(Class<?> eventType); @Override ErrorHandler getErrorHandler(); @Override void setErrorHandler(ErrorHandler errorHandler); @Override boolean equals(Object obj); @Override int hashCode(); }
AbstractClientConnector implements ClientConnector,
        MethodEventSource { protected <T extends ServerRpc> void registerRpc(T implementation, Class<T> rpcInterfaceType) { rpcManagerMap.put(rpcInterfaceType.getName(), new ServerRpcManager<T>( implementation, rpcInterfaceType)); }  @Override void addAttachListener(AttachListener listener); @Override void removeAttachListener(AttachListener listener); Flow<AttachEvent> attachEvents(); @Override void addDetachListener(DetachListener listener); @Override void removeDetachListener(DetachListener listener); Flow<DetachEvent> detachEvents(); @Deprecated @Override void requestRepaint(); @Override void markAsDirty(); @Override JsonObject encodeState(); @Override Class<? extends SharedState> getStateType(); @Override ServerRpcManager<?> getRpcManager(String rpcInterfaceName); @Override List<ClientMethodInvocation> retrievePendingRpcCalls(); @Override String getConnectorId(); @Override UI getUI(); @Override @Deprecated void requestRepaintAll(); @Override void markAsDirtyRecursive(); static Iterable<? extends ClientConnector> getAllChildrenIterable(
            final ClientConnector connector); @Override Collection<Extension> getExtensions(); @Override void removeExtension(Extension extension); @Override boolean isAttached(); @Override void attach(); @Override void detach(); @Override boolean isConnectorEnabled(); @Override void beforeClientResponse(boolean initial); @Override boolean handleConnectorRequest(VaadinRequest request,
            VaadinResponse response, String path); @Deprecated @Override void addListener(Class<?> eventType, Object target, Method method); @Override @Deprecated void removeListener(Class<?> eventType, Object target); @Override @Deprecated void removeListener(Class<?> eventType, Object target,
            Method method); @Deprecated Collection<?> getListeners(Class<?> eventType); @Override ErrorHandler getErrorHandler(); @Override void setErrorHandler(ErrorHandler errorHandler); @Override boolean equals(Object obj); @Override int hashCode();  }