RemoteProcessGroupSchemaV2 extends BaseSchema implements ConvertableSchema<RemoteProcessGroupSchema> { public String getTransportProtocol() { return transportProtocol; } RemoteProcessGroupSchemaV2(Map map); @Override RemoteProcessGroupSchema convert(); @Override List<String> getValidationIssues(); @Override int getVersion(); String getTransportProtocol(); String getName(); String getId(); List<RemotePortSchema> getInputPorts();  }
@Test public void testTransportProtocol() { Map<String, Object> map = new HashMap<>(); map.put(CommonPropertyKeys.INPUT_PORTS_KEY, Arrays.asList(createPortSchema("f94d2469-39f8-4f07-a0d8-acd9396f639e", "testName", ConfigSchema.TOP_LEVEL_NAME).toMap())); map.put(RemoteProcessGroupSchema.URL_KEY, "http: map.put(CommonPropertyKeys.ID_KEY, "a58d2fab-7efe-4cb7-8224-12a60bd8003d"); map.put(RemoteProcessGroupSchema.TRANSPORT_PROTOCOL_KEY, "not valid"); validateIssuesNumMatches(1, new RemoteProcessGroupSchemaV2(map)); map.put(RemoteProcessGroupSchema.TRANSPORT_PROTOCOL_KEY, "RAW"); RemoteProcessGroupSchemaV2 first = new RemoteProcessGroupSchemaV2(map); validateIssuesNumMatches(0,first); assertEquals(first.getTransportProtocol(), "RAW"); map.put(RemoteProcessGroupSchema.TRANSPORT_PROTOCOL_KEY, "HTTP"); RemoteProcessGroupSchemaV2 second = new RemoteProcessGroupSchemaV2(map); validateIssuesNumMatches(0, second); assertEquals(second.getTransportProtocol(), "HTTP"); }