@Test public void shouldNotThrowExceptionWhileValidatingHeadersWithMismatchCase() throws UploadException { List<String> headers = new ArrayList<>(); headers.add("MANDAtory String Field"); headers.add("mandatoryIntFIELD"); ModelClass modelClass = new ModelClass(DummyImportable.class); modelClass.validateHeaders(headers); }
public void validateHeaders(List<String> headers) { validateNullHeaders(headers); List<String> lowerCaseHeaders = lowerCase(headers); if (!acceptExtraHeaders) validateInvalidHeaders(lowerCaseHeaders); validateMandatoryFields(lowerCaseHeaders); }
ModelClass { public void validateHeaders(List<String> headers) { validateNullHeaders(headers); List<String> lowerCaseHeaders = lowerCase(headers); if (!acceptExtraHeaders) validateInvalidHeaders(lowerCaseHeaders); validateMandatoryFields(lowerCaseHeaders); } }
ModelClass { public void validateHeaders(List<String> headers) { validateNullHeaders(headers); List<String> lowerCaseHeaders = lowerCase(headers); if (!acceptExtraHeaders) validateInvalidHeaders(lowerCaseHeaders); validateMandatoryFields(lowerCaseHeaders); } ModelClass(Class<? extends Importable> clazz);  ModelClass(Class<? extends Importable> clazz, boolean acceptExtraHeaders); }
ModelClass { public void validateHeaders(List<String> headers) { validateNullHeaders(headers); List<String> lowerCaseHeaders = lowerCase(headers); if (!acceptExtraHeaders) validateInvalidHeaders(lowerCaseHeaders); validateMandatoryFields(lowerCaseHeaders); } ModelClass(Class<? extends Importable> clazz);  ModelClass(Class<? extends Importable> clazz, boolean acceptExtraHeaders); void validateHeaders(List<String> headers); String[] getFieldNameMappings(String[] headers); Field findImportFieldWithName(final String name); }
ModelClass { public void validateHeaders(List<String> headers) { validateNullHeaders(headers); List<String> lowerCaseHeaders = lowerCase(headers); if (!acceptExtraHeaders) validateInvalidHeaders(lowerCaseHeaders); validateMandatoryFields(lowerCaseHeaders); } ModelClass(Class<? extends Importable> clazz);  ModelClass(Class<? extends Importable> clazz, boolean acceptExtraHeaders); void validateHeaders(List<String> headers); String[] getFieldNameMappings(String[] headers); Field findImportFieldWithName(final String name);  }