private void registerSerializer(ObjectStubSerializer<?, ? extends Stub> serializer) {
    registerSerializer(serializer.getExternalId(), () -> serializer);
  }
private void registerSerializer(ObjectStubSerializer<?, ? extends Stub> serializer)