@Override
  public void insert(Person person) {
    Optional<Person> elem = personList.stream().filter(p -> p.getPersonNationalId() == person.getPersonNationalId()).findFirst();
    if (elem.isPresent()) {
      LOGGER.info("Record already exists.");
      return;
    }
    personList.add(person);
  }
@Test
  void testInsert(){
    // DataBase initialization.
    PersonDbSimulatorImplementation db = new PersonDbSimulatorImplementation();
    Assertions.assertEquals(0,db.size(),"Size of null database should be 0");
    // Dummy persons.
    Person person1 = new Person(1, "Thomas", 27304159);
    Person person2 = new Person(2, "John", 42273631);
    Person person3 = new Person(3, "Arthur", 27489171);
    db.insert(person1);
    db.insert(person2);
    db.insert(person3);
    // Test size after insertion.
    Assertions.assertEquals(3,db.size(),"Incorrect size for database.");
    Person person4 = new Person(4, "Finn", 20499078);
    Person person5 = new Person(5, "Michael", 40599078);
    db.insert(person4);
    db.insert(person5);
    // Test size after more insertions.
    Assertions.assertEquals(5,db.size(),"Incorrect size for database.");
    Person person5duplicate = new Person(5,"Kevin",89589122);
    db.insert(person5duplicate);
    // Test size after attempt to insert record with duplicate key.
    Assertions.assertEquals(5,db.size(),"Incorrect size for data base");
  }