// (ུ) Contract contract = new Contract(); User targetUser = new User(contract); LocalDateTime workingStartTime1 = LocalDateTime.of(2017, 9, 1, 10, 00); LocalDateTime workingEndTime1 = LocalDateTime.of(2017, 9, 1, 18, 00); LocalDateTime workingStartTime2 = LocalDateTime.of(2017, 9, 1, 22, 00); LocalDateTime workingEndTime2 = LocalDateTime.of(2017, 9, 2, 4, 00); WorkingTimeCalculator target = new WorkingTimeCalculator(targetUser, workingStartTime1, workingEndTime1, workingStartTime2, workingEndTime2); Class<WorkingTimeCalculator> c = WorkingTimeCalculator.class; Method m = c.getDeclaredMethod("calculation", null); m.setAccessible(true); m.invoke(target, null); CalculationResult result = target.getCaluculationResult(); assertEquals(720, result.getWorkTime()); List<Integer> breakTimeList = result.getBreakTimeList(); assertEquals(2, breakTimeList.size()); assertEquals(60, breakTimeList[0]); assertEquals(45, breakTimeList[1]); } } 16