MutableHandlerRegistry extends HandlerRegistry { @Nullable public ServerServiceDefinition addService(ServerServiceDefinition service) { return services.put(service.getName(), service); }  @Nullable ServerServiceDefinition addService(ServerServiceDefinition service); boolean removeService(ServerServiceDefinition service); @Override @Nullable ServerMethodDefinition<?, ?> lookupMethod(String methodName, @Nullable String authority);  }
@Test public void initialAddReturnsNull() { assertNull(registry.addService(basicServiceDefinition)); assertNull(registry.addService(multiServiceDefinition)); }
@Test public void addReturnsPrevious() { assertNull(registry.addService(basicServiceDefinition)); assertSame(basicServiceDefinition, registry.addService(ServerServiceDefinition.builder("basic").build())); }