From 97d86cd11a81f901d1f76977fee9983bbbd60c61 Mon Sep 17 00:00:00 2001 From: Matthias Engelien Date: Mon, 9 Sep 2024 21:13:43 +0200 Subject: [PATCH] Import of CSV-Data and data structure --- .../ga/config/DataBaseConfiguration.java | 8 +-- .../java/de/etecture/ga/config/Setup.java | 17 ++---- .../de/etecture/ga/model/Appointment.java | 11 +++- .../java/de/etecture/ga/model/Garage.java | 45 ++++++++++------ .../de/etecture/ga/model/GarageServices.java | 16 +++++- .../java/de/etecture/ga/model/MDService.java | 4 +- .../ga/repository/AppointmentRepository.java | 9 ++++ .../ga/repository/GarageRepository.java | 12 +++++ .../repository/GarageServiceRepository.java | 20 +++++++ .../ga/repository/MDServiceRepository.java | 12 +++++ .../ga/service/GarageImportService.java | 54 ++++++++++++------- .../etecture/ga/service/MDServiceService.java | 39 ++++++++++++++ src/main/resources/data.sql | 25 +++++++++ src/main/resources/schema.sql | 29 +++++----- ...AppointmentManagementApplicationTests.java | 23 ++++++++ .../ga/service/GarageImportServiceTest.java | 40 -------------- src/test/resources/data.sql | 12 +++++ .../import/{test_data.csv => test-data.csv} | 0 18 files changed, 266 insertions(+), 110 deletions(-) create mode 100644 src/main/java/de/etecture/ga/repository/AppointmentRepository.java create mode 100644 src/main/java/de/etecture/ga/repository/GarageRepository.java create mode 100644 src/main/java/de/etecture/ga/repository/GarageServiceRepository.java create mode 100644 src/main/java/de/etecture/ga/repository/MDServiceRepository.java create mode 100644 src/main/java/de/etecture/ga/service/MDServiceService.java create mode 100644 src/main/resources/data.sql delete mode 100644 src/test/java/de/etecture/ga/service/GarageImportServiceTest.java create mode 100644 src/test/resources/data.sql rename src/test/resources/import/{test_data.csv => test-data.csv} (100%) diff --git a/src/main/java/de/etecture/ga/config/DataBaseConfiguration.java b/src/main/java/de/etecture/ga/config/DataBaseConfiguration.java index 04863bc..cb189da 100644 --- a/src/main/java/de/etecture/ga/config/DataBaseConfiguration.java +++ b/src/main/java/de/etecture/ga/config/DataBaseConfiguration.java @@ -5,18 +5,14 @@ import java.time.temporal.ChronoUnit; import java.util.Arrays; import java.util.List; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; import org.springframework.data.convert.ReadingConverter; import org.springframework.data.convert.WritingConverter; import org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration; import org.springframework.stereotype.Component; - @Component public class DataBaseConfiguration extends AbstractJdbcConfiguration { - @Override protected List userConverters() { @@ -28,7 +24,7 @@ public class DataBaseConfiguration extends AbstractJdbcConfiguration { @Override public Long convert(Duration duration) { - return duration.toNanos(); + return duration.toSeconds(); } } @@ -37,7 +33,7 @@ public class DataBaseConfiguration extends AbstractJdbcConfiguration { @Override public Duration convert(Long duration) { - return Duration.of(duration, ChronoUnit.NANOS); + return Duration.of(duration, ChronoUnit.SECONDS); } } diff --git a/src/main/java/de/etecture/ga/config/Setup.java b/src/main/java/de/etecture/ga/config/Setup.java index 645b766..248cd8c 100644 --- a/src/main/java/de/etecture/ga/config/Setup.java +++ b/src/main/java/de/etecture/ga/config/Setup.java @@ -1,29 +1,22 @@ package de.etecture.ga.config; -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import de.etecture.ga.model.Garage; import de.etecture.ga.service.GarageImportService; import jakarta.annotation.PostConstruct; +import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @Slf4j @Component +@AllArgsConstructor public class Setup { - @Autowired - private GarageImportService importService; + private final GarageImportService importService; @PostConstruct - private void setupData() { - - List garages = importService.importGarageData(); - - // Daten in DB übertragen + private void importData() { + importService.importGarageData(); } - } diff --git a/src/main/java/de/etecture/ga/model/Appointment.java b/src/main/java/de/etecture/ga/model/Appointment.java index aea27dd..092a8f8 100644 --- a/src/main/java/de/etecture/ga/model/Appointment.java +++ b/src/main/java/de/etecture/ga/model/Appointment.java @@ -4,20 +4,29 @@ import java.time.Duration; import java.util.Date; import org.springframework.data.annotation.Id; +import org.springframework.data.jdbc.core.mapping.AggregateReference; +import org.springframework.data.relational.core.mapping.Column; import lombok.Data; +import lombok.experimental.Accessors; @Data +@Accessors(fluent = true, chain = true) public class Appointment { @Id private Long id; + @Column("GARAGE_ID") + private AggregateReference garageId; + private String serviceCode; private String serviceName; private Date appointmentTime; - private Duration duration; + private Integer slot = 1; + + private Duration duration = Duration.ZERO; } diff --git a/src/main/java/de/etecture/ga/model/Garage.java b/src/main/java/de/etecture/ga/model/Garage.java index 25d69a7..cc609b4 100644 --- a/src/main/java/de/etecture/ga/model/Garage.java +++ b/src/main/java/de/etecture/ga/model/Garage.java @@ -1,48 +1,63 @@ package de.etecture.ga.model; -import java.util.ArrayList; -import java.util.List; +import java.time.Duration; +import java.util.HashSet; import java.util.Set; import org.springframework.data.annotation.Id; +import org.springframework.data.jdbc.core.mapping.AggregateReference; +import org.springframework.data.relational.core.mapping.MappedCollection; import org.springframework.util.Assert; import lombok.Data; +import lombok.experimental.Accessors; @Data +@Accessors(fluent = true, chain = true) public class Garage { @Id private Long id; + private String code; + private String name; - private List appointments; + private Integer maxAppointments = 1; - private Set garageServices; + @MappedCollection(idColumn = "GARAGE_ID") + private Set appointments = new HashSet<>(); + + @MappedCollection(idColumn = "GARAGE_ID") + private Set garageServices = new HashSet<>(); public Garage addAppointment(Appointment appointment) { - if (this.appointments == null) { - this.appointments = new ArrayList<>(); + boolean added = this.appointments.add(appointment); + if(!added) { + appointment.slot(appointment.slot() + 1); + this.addAppointment(appointment); } - - this.appointments.add(appointment); return this; } - public void addService(MDService service) { - garageServices.add(createGarageService(service)); + public Garage addService(MDService service) { + garageServices.add(createGarageService(service, null)); + return this; } - private GarageServices createGarageService(MDService service) { + public void addService(MDService service, Duration duration) { + garageServices.add(createGarageService(service, duration)); + } + + private GarageServices createGarageService(MDService service, Duration duration) { Assert.notNull(service, "Service must not be null"); - Assert.notNull(service.getId(), "Service id, must not be null"); + Assert.notNull(service.id(), "Service id, must not be null"); - GarageServices garageService = new GarageServices(); - garageService.setMdService(service.getId()); + duration = duration == null ? service.duration() : duration; - return garageService; + return new GarageServices().garageId(AggregateReference.to(this.id())) + .serviceId(AggregateReference.to(service.id())).duration(duration); } } diff --git a/src/main/java/de/etecture/ga/model/GarageServices.java b/src/main/java/de/etecture/ga/model/GarageServices.java index 5981b78..edb07ed 100644 --- a/src/main/java/de/etecture/ga/model/GarageServices.java +++ b/src/main/java/de/etecture/ga/model/GarageServices.java @@ -1,9 +1,23 @@ package de.etecture.ga.model; +import java.time.Duration; + +import org.springframework.data.jdbc.core.mapping.AggregateReference; +import org.springframework.data.relational.core.mapping.Column; + import lombok.Data; +import lombok.experimental.Accessors; @Data +@Accessors(fluent = true, chain = true) public class GarageServices { - private Long mdService; + @Column("GARAGE_ID") + private AggregateReference garageId; + + @Column("SERVICE_ID") + private AggregateReference serviceId; + + private Duration duration; + } diff --git a/src/main/java/de/etecture/ga/model/MDService.java b/src/main/java/de/etecture/ga/model/MDService.java index 45d8024..312a434 100644 --- a/src/main/java/de/etecture/ga/model/MDService.java +++ b/src/main/java/de/etecture/ga/model/MDService.java @@ -5,8 +5,10 @@ import java.time.Duration; import org.springframework.data.annotation.Id; import lombok.Data; +import lombok.experimental.Accessors; @Data +@Accessors(fluent = true, chain = true) public class MDService { @Id @@ -16,6 +18,6 @@ public class MDService { private String name; - private Duration duration; + private Duration duration = Duration.ZERO; } diff --git a/src/main/java/de/etecture/ga/repository/AppointmentRepository.java b/src/main/java/de/etecture/ga/repository/AppointmentRepository.java new file mode 100644 index 0000000..cc4716e --- /dev/null +++ b/src/main/java/de/etecture/ga/repository/AppointmentRepository.java @@ -0,0 +1,9 @@ +package de.etecture.ga.repository; + +import org.springframework.data.repository.CrudRepository; + +import de.etecture.ga.model.Appointment; + +public interface AppointmentRepository extends CrudRepository { + +} diff --git a/src/main/java/de/etecture/ga/repository/GarageRepository.java b/src/main/java/de/etecture/ga/repository/GarageRepository.java new file mode 100644 index 0000000..f9c6caf --- /dev/null +++ b/src/main/java/de/etecture/ga/repository/GarageRepository.java @@ -0,0 +1,12 @@ +package de.etecture.ga.repository; + +import java.util.Optional; + +import org.springframework.data.repository.CrudRepository; + +import de.etecture.ga.model.Garage; + +public interface GarageRepository extends CrudRepository { + + public Optional findByCode(String code); +} diff --git a/src/main/java/de/etecture/ga/repository/GarageServiceRepository.java b/src/main/java/de/etecture/ga/repository/GarageServiceRepository.java new file mode 100644 index 0000000..f2ec339 --- /dev/null +++ b/src/main/java/de/etecture/ga/repository/GarageServiceRepository.java @@ -0,0 +1,20 @@ +package de.etecture.ga.repository; + +import java.util.Optional; + +import org.springframework.data.jdbc.repository.query.Query; +import org.springframework.data.repository.CrudRepository; + +import de.etecture.ga.model.GarageServices; +import de.etecture.ga.model.MDService; + +public interface GarageServiceRepository extends CrudRepository { + + + @Query("select s.ID, s.CODE, s.NAME, ifNull(gs.DURATION, s.DURATION) as DURATION " + + "from GARAGE_SERVICES gs " + + "join MD_SERVICE s on s.ID = gs.SERVICE_ID " + + "join GARAGE g on g.ID = gs.GARAGE_ID " + + "where s.CODE = :serviceCode and g.CODE = :garageCode") + public Optional findByServiceCodeAndGarage(String serviceCode, String garageCode); +} diff --git a/src/main/java/de/etecture/ga/repository/MDServiceRepository.java b/src/main/java/de/etecture/ga/repository/MDServiceRepository.java new file mode 100644 index 0000000..da3b14c --- /dev/null +++ b/src/main/java/de/etecture/ga/repository/MDServiceRepository.java @@ -0,0 +1,12 @@ +package de.etecture.ga.repository; + +import java.util.Optional; + +import org.springframework.data.repository.CrudRepository; + +import de.etecture.ga.model.MDService; + +public interface MDServiceRepository extends CrudRepository { + + public Optional findByCode(String code); +} diff --git a/src/main/java/de/etecture/ga/service/GarageImportService.java b/src/main/java/de/etecture/ga/service/GarageImportService.java index 489d578..5d496c9 100644 --- a/src/main/java/de/etecture/ga/service/GarageImportService.java +++ b/src/main/java/de/etecture/ga/service/GarageImportService.java @@ -5,7 +5,6 @@ import java.net.URISyntaxException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; @@ -13,6 +12,7 @@ import java.util.Objects; import java.util.Optional; import java.util.stream.Stream; +import org.springframework.data.jdbc.core.mapping.AggregateReference; import org.springframework.stereotype.Service; import com.fasterxml.jackson.databind.MappingIterator; @@ -21,42 +21,54 @@ import com.fasterxml.jackson.dataformat.csv.CsvSchema; import de.etecture.ga.model.Appointment; import de.etecture.ga.model.Garage; +import de.etecture.ga.model.MDService; +import de.etecture.ga.repository.AppointmentRepository; +import de.etecture.ga.repository.GarageRepository; +import de.etecture.ga.repository.GarageServiceRepository; +import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @Slf4j @Service +@AllArgsConstructor public class GarageImportService { private static final String IMPORT_FOLDER = "import"; - - public List importGarageData() { + private final GarageRepository garageRepository; - List importData = new ArrayList<>(); + private final GarageServiceRepository garageServiceRepository; + + private final AppointmentRepository appointmentRepository; + + public void importGarageData() { try (Stream files = Files .list(Paths.get(getClass().getClassLoader().getResource(IMPORT_FOLDER).toURI()))) { files.filter(Files::isRegularFile).filter(path -> path.toString().endsWith(".csv")) - .map(this::loadGarageData).mapMulti(Optional::ifPresent).forEach(importData::add); + .forEach(this::loadGarageData); } catch (IOException | URISyntaxException e) { log.error("Can't read file", e); } - - return importData; } public Optional loadGarageData(final Path file) { - Garage garage = new Garage(); - garage.setName(getGarageNameFromFile(file)); + Optional garage = garageRepository.findByCode(getGarageNameFromFile(file)); - List appointments = loadObjectsFromFile(file); - appointments.stream().map(this::fromCSVData).filter(Objects::nonNull) - .forEach(garage::addAppointment); + if (garage.isPresent()) { + List appointmentData = loadObjectsFromFile(file); - return Optional.of(garage); + appointmentData.stream().filter(Objects::nonNull) + .forEach(data -> addAppointmentToGarage(data, garage.get())); + + // bestehende Termine speichern + garage.get().appointments().forEach(appointmentRepository::save); + } + + return garage; } private String getGarageNameFromFile(final Path fileName) { @@ -87,16 +99,18 @@ public class GarageImportService { } } - private Appointment fromCSVData(CSVData data) { + private void addAppointmentToGarage(CSVData data, Garage garage) { - if (data == null) - return null; + Optional garageService = garageServiceRepository.findByServiceCodeAndGarage(data.SERVICE, + garage.code()); - Appointment appointment = new Appointment(); - appointment.setAppointmentTime(data.APP_DATE); - appointment.setServiceCode(data.SERVICE); + garageService.map(service -> getAppointmentForService(service, data.APP_DATE, garage.id())) + .ifPresent(garage::addAppointment); + } - return appointment; + private Appointment getAppointmentForService(MDService service, Date date, Long garageId) { + return new Appointment().appointmentTime(date).serviceCode(service.code()).serviceName(service.name()) + .duration(service.duration()).garageId(AggregateReference.to(garageId)); } private record CSVData(Date APP_DATE, String SERVICE) { diff --git a/src/main/java/de/etecture/ga/service/MDServiceService.java b/src/main/java/de/etecture/ga/service/MDServiceService.java new file mode 100644 index 0000000..37722f4 --- /dev/null +++ b/src/main/java/de/etecture/ga/service/MDServiceService.java @@ -0,0 +1,39 @@ +package de.etecture.ga.service; + +import java.security.InvalidParameterException; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.util.Assert; + +import de.etecture.ga.model.MDService; +import de.etecture.ga.repository.MDServiceRepository; +import lombok.AllArgsConstructor; + +@Service +@AllArgsConstructor +public class MDServiceService { + + private final MDServiceRepository serviceRepository; + + public MDService storeMDService(String serviceCode) { + + if (StringUtils.isBlank(serviceCode)) + throw new InvalidParameterException("serviceCode should not been empty"); + + MDService service = serviceRepository.findByCode(serviceCode).orElse(new MDService().code(serviceCode)); + + return serviceRepository.save(service); + } + + public MDService storeMDService(MDService serviceToSafe) { + + Assert.notNull(serviceToSafe, "Service must not be null"); + Assert.notNull(serviceToSafe.code(), "Service code must not be null"); + Assert.isTrue(serviceToSafe.duration().isPositive(), "Service duration must must be bigger then 0"); + + MDService service = serviceRepository.findByCode(serviceToSafe.code()).orElse(serviceToSafe); + + return serviceRepository.save(service); + } +} diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql new file mode 100644 index 0000000..28b18d2 --- /dev/null +++ b/src/main/resources/data.sql @@ -0,0 +1,25 @@ +-- initial data +INSERT INTO MD_SERVICE (CODE, NAME, DURATION) +VALUES +('MOT', 'Motorinstandsetzung', 14400), +('OIL', 'Ölwechsel', 900), +('WHE', 'Radwechsel', 1800), +('FIX', 'Blechreparatur', 10800), +('INS', 'Hauptuntersuchung', 3600); + + +INSERT INTO GARAGE (CODE, NAME, MAX_APPOINTMENTS) +VALUES +('autohaus-schmidt', 'Autohaus Schmidt', 2), +('meisterbetrieb-bachstraße', 'Meisterbetrieb Bachstraße', 3); + + +INSERT INTO GARAGE_SERVICES (GARAGE_ID, SERVICE_ID, DURATION) +VALUES +(1, 1, 14400), +(1, 2, 900), +(1, 3, 1800), +(2, 2, 600), +(2, 4, 10800), +(2, 5, 3600); + diff --git a/src/main/resources/schema.sql b/src/main/resources/schema.sql index 9901534..594a810 100644 --- a/src/main/resources/schema.sql +++ b/src/main/resources/schema.sql @@ -1,41 +1,42 @@ CREATE TABLE GARAGE ( ID BIGINT NOT NULL AUTO_INCREMENT UNIQUE, - NAME VARCHAR(200) DEFAULT NULL UNIQUE, + CODE VARCHAR(100) DEFAULT NULL UNIQUE, + NAME VARCHAR(200) DEFAULT NULL, + MAX_APPOINTMENTS INT NOT NULL DEFAULT 1, PRIMARY KEY (ID) ); - CREATE TABLE APPOINTMENT ( ID BIGINT NOT NULL AUTO_INCREMENT UNIQUE, - GARAGE BIGINT NOT NULL, + GARAGE_ID BIGINT NOT NULL, SERVICE_CODE VARCHAR(5) DEFAULT NULL, SERVICE_NAME VARCHAR(50) DEFAULT NULL, APPOINTMENT_TIME DATE DEFAULT NULL, + SLOT INT NOT NULL DEFAULT 1, DURATION BIGINT NOT NULL DEFAULT 0, - - CONSTRAINT GARAGE_APPOINTMENT_IDX UNIQUE (GARAGE,APPOINTMENT_TIME), - + PRIMARY KEY (ID), - FOREIGN KEY (GARAGE) REFERENCES GARAGE(ID) + FOREIGN KEY (GARAGE_ID) REFERENCES GARAGE(ID) ); CREATE TABLE MD_SERVICE ( ID BIGINT NOT NULL AUTO_INCREMENT UNIQUE, CODE VARCHAR(5) NOT NULL UNIQUE, NAME VARCHAR(50) DEFAULT NULL, - DURATION INT NOT NULL, + DURATION BIGINT DEFAULT 0, PRIMARY KEY (ID) ); -CREATE TABLE GARAGE_SERVICES_MAP ( - GARAGE BIGINT NOT NULL, - MD_SERVICE BIGINT NOT NULL, +CREATE TABLE GARAGE_SERVICES ( + GARAGE_ID BIGINT NOT NULL, + SERVICE_ID BIGINT NOT NULL, + DURATION BIGINT DEFAULT NULL, - CONSTRAINT GARAGE_SERVICE_IDX UNIQUE (GARAGE,MD_SERVICE), + CONSTRAINT GARAGE_SERVICE_IDX UNIQUE (GARAGE_ID, SERVICE_ID), - FOREIGN KEY (GARAGE) REFERENCES GARAGE(ID), - FOREIGN KEY (MD_SERVICE) REFERENCES MD_SERVICE(ID) + FOREIGN KEY (GARAGE_ID) REFERENCES GARAGE(ID), + FOREIGN KEY (SERVICE_ID) REFERENCES MD_SERVICE(ID) ); \ No newline at end of file diff --git a/src/test/java/de/etecture/ga/GarageAppointmentManagementApplicationTests.java b/src/test/java/de/etecture/ga/GarageAppointmentManagementApplicationTests.java index 30a53b6..0845f31 100644 --- a/src/test/java/de/etecture/ga/GarageAppointmentManagementApplicationTests.java +++ b/src/test/java/de/etecture/ga/GarageAppointmentManagementApplicationTests.java @@ -1,13 +1,36 @@ package de.etecture.ga; +import static org.assertj.core.api.Assertions.assertThat; + +import java.net.URISyntaxException; +import java.util.Optional; + import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; +import de.etecture.ga.model.Garage; +import de.etecture.ga.repository.GarageRepository; + @SpringBootTest class GarageAppointmentManagementApplicationTests { + @Autowired + private GarageRepository garageRepository; + @Test void contextLoads() { } + @Test + void testImportedGarageData() throws URISyntaxException { + + Optional testGarage = garageRepository.findByCode("test-data"); + + assertThat(testGarage).isPresent(); + assertThat(testGarage.get().name()).isEqualTo("Test Autohaus"); + assertThat(testGarage.get().appointments()).hasSize(19); + assertThat(testGarage.get().garageServices()).hasSize(3); + } + } diff --git a/src/test/java/de/etecture/ga/service/GarageImportServiceTest.java b/src/test/java/de/etecture/ga/service/GarageImportServiceTest.java deleted file mode 100644 index b165d6f..0000000 --- a/src/test/java/de/etecture/ga/service/GarageImportServiceTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package de.etecture.ga.service; - -import static org.assertj.core.api.Assertions.assertThat; - -import java.net.URISyntaxException; -import java.util.List; - -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.junit.jupiter.MockitoExtension; - -import de.etecture.ga.model.Appointment; -import de.etecture.ga.model.Garage; -import lombok.extern.slf4j.Slf4j; - -@ExtendWith(MockitoExtension.class) -@TestMethodOrder(MethodOrderer.OrderAnnotation.class) -@Slf4j -class GarageImportServiceTest { - - @InjectMocks - private GarageImportService service; - - - @Test - void testImportGarageData() throws URISyntaxException { - - List garageData = service.importGarageData(); - - assertThat(garageData).isNotEmpty().hasOnlyElementsOfType(Garage.class).hasSize(1); - - Garage garageToTest = garageData.get(0); - assertThat(garageToTest.getName()).isEqualTo("test_data"); - assertThat(garageToTest.getAppointments()).hasOnlyElementsOfType(Appointment.class).hasSize(19); - } - -} diff --git a/src/test/resources/data.sql b/src/test/resources/data.sql new file mode 100644 index 0000000..c8bcc8c --- /dev/null +++ b/src/test/resources/data.sql @@ -0,0 +1,12 @@ +-- test data +INSERT INTO GARAGE (CODE, NAME, MAX_APPOINTMENTS) +VALUES +('test-data', 'Test Autohaus', 2); + + +INSERT INTO GARAGE_SERVICES (GARAGE_ID, SERVICE_ID, DURATION) +VALUES +(select id from GARAGE where CODE = 'test-data', 1, 14400), +(select id from GARAGE where CODE = 'test-data', 2, 900), +(select id from GARAGE where CODE = 'test-data', 3, 1800); + diff --git a/src/test/resources/import/test_data.csv b/src/test/resources/import/test-data.csv similarity index 100% rename from src/test/resources/import/test_data.csv rename to src/test/resources/import/test-data.csv