public Person getPerson(int key) {
    // Try to find person in the identity map
    Person person = this.identityMap.getPerson(key);
    if (person != null) {
      LOGGER.info("Person found in the Map");
      return person;
    } else {
      // Try to find person in the database
      person = this.db.find(key);
      if (person != null) {
        this.identityMap.addPerson(person);
        LOGGER.info("Person found in DB.");
        return person;
      }
      LOGGER.info("Person with this ID does not exist.");
      return null;
    }
  }
@Test
  void personFoundInDB(){
    // personFinderInstance
    PersonFinder personFinder = new PersonFinder();
    // init database for our personFinder
    PersonDbSimulatorImplementation db = new PersonDbSimulatorImplementation();
    // Dummy persons
    Person person1 = new Person(1, "John", 27304159);
    Person person2 = new Person(2, "Thomas", 42273631);
    Person person3 = new Person(3, "Arthur", 27489171);
    Person person4 = new Person(4, "Finn", 20499078);
    Person person5 = new Person(5, "Michael", 40599078);
    // Add data to the database.
    db.insert(person1);
    db.insert(person2);
    db.insert(person3);
    db.insert(person4);
    db.insert(person5);
    personFinder.setDb(db);

    Assertions.assertEquals(person1,personFinder.getPerson(1),"Find person returns incorrect record.");
    Assertions.assertEquals(person3,personFinder.getPerson(3),"Find person returns incorrect record.");
    Assertions.assertEquals(person2,personFinder.getPerson(2),"Find person returns incorrect record.");
    Assertions.assertEquals(person5,personFinder.getPerson(5),"Find person returns incorrect record.");
    Assertions.assertEquals(person4,personFinder.getPerson(4),"Find person returns incorrect record.");
  }