@Test public void test() { Date start = new Date(); Date end = new Date(start.getTime() + 10); Period period = new Period(start, end); Player player1 = new Player("player"); ReferenceService service = new ReferenceService(); EntityReference playerRef1 = player1.accept(service, null); EntityReference periodRef = period.accept(service, null); CashGamePerformance p = new CashGamePerformance( playerRef1, periodRef, Stake.Micro, new Date(), 0, 0, UUID.randomUUID()); assertEquals(period.getId(), p.getPeriodReference().getId()); assertEquals(period.getType(), p.getPeriodReference().getType()); assertEquals(Stake.Micro, p.getStake()); assertEquals(0, p.getHands()); assertEquals(0d, p.getBuyIns(), 0); p = new CashGamePerformance( playerRef1, periodRef, Stake.Micro, new Date(), 12.32d, 25, UUID.randomUUID()); assertEquals(25, p.getHands()); assertEquals(12.32d, p.getBuyIns(), 0); p = new CashGamePerformance( playerRef1, periodRef, Stake.Micro, new Date(), -52.32d, 25, UUID.randomUUID()); assertEquals(-52.32d, p.getBuyIns(), 0); }