RawConfig extends ConfigInstance { public String getDefMd5() { return defMd5; } RawConfig(ConfigKey<?> key, String defMd5);  RawConfig(ConfigKey<?> key, String defMd5, Payload payload, String configMd5, long generation,
                     boolean internalRedeploy, List<String> defContent, Optional<VespaVersion> vespaVersion);  RawConfig(RawConfig rawConfig);  RawConfig(ConfigKey<?> key, String defMd5, Payload payload, String configMd5, long generation,
                     boolean internalRedeploy, int errorCode, List<String> defContent, Optional<VespaVersion> vespaVersion); static RawConfig createFromResponseParameters(JRTClientConfigRequest req); static RawConfig createFromServerRequest(JRTServerConfigRequest req); ConfigKey<?> getKey(); String getName(); String getNamespace(); String getConfigId(); String getConfigMd5(); String getDefMd5(); long getGeneration(); void setGeneration(long generation); void setInternalRedeploy(boolean internalRedeploy); boolean isInternalRedeploy(); Payload getPayload(); int errorCode(); String getDefNamespace(); Optional<VespaVersion> getVespaVersion(); boolean hasEqualConfig(JRTServerConfigRequest req); boolean hasNewerGeneration(JRTServerConfigRequest req); boolean isError(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); List<String> getDefContent();  }
@Test public void require_correct_defmd5() { final String defMd5ForEmptyDefContent = "d41d8cd98f00b204e9800998ecf8427e"; RawConfig config = new RawConfig(key, null, payload, configMd5, generation, false, defContent, Optional.empty()); assertThat(config.getDefMd5(), is(defMd5)); config = new RawConfig(key, "", payload, configMd5, generation, false, defContent, Optional.empty()); assertThat(config.getDefMd5(), is(defMd5)); config = new RawConfig(key, defMd5, payload, configMd5, generation, false, defContent, Optional.empty()); assertThat(config.getDefMd5(), is(defMd5)); config = new RawConfig(key, null, payload, configMd5, generation, false, null, Optional.empty()); assertNull(config.getDefMd5()); config = new RawConfig(key, null, payload, configMd5, generation, false,List.of(""), Optional.empty()); assertThat(config.getDefMd5(), is(defMd5ForEmptyDefContent)); config = new RawConfig(key, "", payload, configMd5, generation, false, null, Optional.empty()); assertThat(config.getDefMd5(), is("")); config = new RawConfig(key, "", payload, configMd5, generation, false, List.of(""), Optional.empty()); assertThat(config.getDefMd5(), is(defMd5ForEmptyDefContent)); }