@Test public void savePunishment() { final UUID uuid = UUID.randomUUID(); PlayerProfile target = new PlayerProfile(uuid, "Name"); ebean.save(target); PunishmentRecord warn = new PunishmentRecord("punisher", target, "warn reason", PunishmentType.WARN); PunishmentRecord kick = new PunishmentRecord("punisher", target, "kick reason", PunishmentType.KICK); PunishmentRecord ban = new PunishmentRecord("punisher", target, "ban reason", PunishmentType.BAN); repository.savePunishment(warn); repository.savePunishment(kick); repository.savePunishment(ban); List<PunishmentRecord> punishments = repository.getPunishments(uuid, 0, 10); assertEquals(3, punishments.size()); assertTrue(punishments.containsAll(Arrays.asList(warn, kick, ban))); }
public void savePunishment(PunishmentRecord punishmentRecord) { ebeanServer.save(punishmentRecord); }
PunishmentRepository { public void savePunishment(PunishmentRecord punishmentRecord) { ebeanServer.save(punishmentRecord); } }
PunishmentRepository { public void savePunishment(PunishmentRecord punishmentRecord) { ebeanServer.save(punishmentRecord); }  }
PunishmentRepository { public void savePunishment(PunishmentRecord punishmentRecord) { ebeanServer.save(punishmentRecord); }  void savePunishment(PunishmentRecord punishmentRecord); List<PunishmentRecord> getPunishments(UUID userId, int page, int count); }
PunishmentRepository { public void savePunishment(PunishmentRecord punishmentRecord) { ebeanServer.save(punishmentRecord); }  void savePunishment(PunishmentRecord punishmentRecord); List<PunishmentRecord> getPunishments(UUID userId, int page, int count);  }