@Test
public void testFindByYearAndMonth() throws Exception {

    MonthlyReport march = MonthlyReport.from(3L, 2014, 3, new byte[SIZE_10MB], DateTime.now());
    MonthlyReport april = MonthlyReport.from(4L, 2014, 4, new byte[SIZE_10MB], DateTime.now());
    monthlyReportRepository.save(march);
    monthlyReportRepository.save(april);
    MonthlyReport foundMarch = monthlyReportRepository.findByYearAndMonth(2014, 3);
    MonthlyReport foundApril = monthlyReportRepository.findByYearAndMonth(2014, 4);
    assertThat(foundMarch).isEqualTo(march);
    assertThat(foundMarch.getMonthlyReportPdf().length).isEqualTo(SIZE_10MB);
    assertThat(foundApril).isEqualTo(april);
    assertThat(foundApril.getMonthlyReportPdf().length).isEqualTo(SIZE_10MB);
}