### Question:
RestPayloadPublisherFactory implements PayloadPublisherFactory { @Override public PayloadPublisher create(Config config) { Discovery partyInfoService = Discovery.getInstance(); ClientFactory clientFactory = new ClientFactory(); Client client = clientFactory.buildFrom(config.getP2PServerConfig()); return new RestPayloadPublisher(client, partyInfoService); }  @Override PayloadPublisher create(Config config); @Override CommunicationType communicationType();  }### Answer:
@Test public void create() { final Config config = new Config(); ServerConfig serverConfig = new ServerConfig(); serverConfig.setCommunicationType(CommunicationType.REST); serverConfig.setApp(AppType.P2P); serverConfig.setServerAddress("http: config.setServerConfigs(Arrays.asList(serverConfig)); PayloadPublisher payloadPublisher = factory.create(config); assertThat(payloadPublisher).isExactlyInstanceOf(RestPayloadPublisher.class); }