HttpPushValidator extends AbstractProtocolValidator { @Override public void validate(final Connection connection, final DittoHeaders dittoHeaders, final ActorSystem actorSystem) { validateUriScheme(connection, dittoHeaders, ACCEPTED_SCHEMES, SECURE_SCHEMES, "HTTP"); validateSourceConfigs(connection, dittoHeaders); validateTargetConfigs(connection, dittoHeaders); validatePayloadMappings(connection, actorSystem, dittoHeaders); validateParallelism(connection.getSpecificConfig(), dittoHeaders); }  static HttpPushValidator newInstance(); @Override ConnectionType type(); @Override void validate(final Connection connection, final DittoHeaders dittoHeaders, final ActorSystem actorSystem);  }
@Test public void testValidTargetAddress() { final DittoHeaders emptyDittoHeaders = DittoHeaders.empty(); underTest.validate(getConnectionWithTarget("POST:events"), emptyDittoHeaders, actorSystem); underTest.validate(getConnectionWithTarget("PUT:ditto/{{thing:id}}"), emptyDittoHeaders, actorSystem); underTest.validate(getConnectionWithTarget("PATCH:/{{thing:namespace}}/{{thing:name}}"), emptyDittoHeaders, actorSystem); underTest.validate(getConnectionWithTarget("PUT:events#{{topic:full}}"), emptyDittoHeaders, actorSystem); underTest.validate(getConnectionWithTarget("POST:ditto?{{header:x}}"), emptyDittoHeaders, actorSystem); underTest.validate(getConnectionWithTarget("POST:"), emptyDittoHeaders, actorSystem); }