PlayerKill implements DateHolder { public Optional<String> getVictimName() { return Optional.ofNullable(victimName); } PlayerKill(UUID victim, String weapon, long date);  PlayerKill(UUID victim, String weapon, long date, String victimName);  PlayerKill(UUID victim, String weapon, long date, String victimName, String killerName); UUID getVictim(); Optional<String> getVictimName(); Optional<String> getKillerName(); @Override long getDate(); String getWeapon(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); boolean isSelfKill(); boolean isNotSelfKill();  }
@Test void noVictimFound() { assertFalse(underTest.getVictimName().isPresent()); }
@Test void victimFound() { String expectedName = "Test Victim"; PlayerKill underTest = new PlayerKill(testUUID, weapon, 100L, expectedName); assertEquals("Test Victim", underTest.getVictimName().orElse("Unknown")); }