source: class PrayerTimesTest {
  
    @Test
    public void testNextPrayer() {
  
target:     DateComponents components = new DateComponents(2015, 9, 1);
      CalculationParameters parameters = CalculationMethod.KARACHI.getParameters();
      parameters.madhab = Madhab.HANAFI;
      parameters.highLatitudeRule = HighLatitudeRule.TWILIGHT_ANGLE;
      Coordinates coordinates = new Coordinates(33.720817, 73.090032);
  
      PrayerTimes p = new PrayerTimes(coordinates, components, parameters);
  
      assertThat(p.nextPrayer(TestUtils.addSeconds(p.fajr, -1))).isEqualTo(Prayer.FAJR);
      assertThat(p.nextPrayer(p.fajr)).isEqualTo(Prayer.SUNRISE);
      assertThat(p.nextPrayer(TestUtils.addSeconds(p.fajr, 1))).isEqualTo(Prayer.SUNRISE);
      assertThat(p.nextPrayer(TestUtils.addSeconds(p.sunrise, 1))).isEqualTo(Prayer.DHUHR);
      assertThat(p.nextPrayer(TestUtils.addSeconds(p.dhuhr, 1))).isEqualTo(Prayer.ASR);
      assertThat(p.nextPrayer(TestUtils.addSeconds(p.asr, 1))).isEqualTo(Prayer.MAGHRIB);
      assertThat(p.nextPrayer(TestUtils.addSeconds(p.maghrib, 1))).isEqualTo(Prayer.ISHA);
      assertThat(p.nextPrayer(TestUtils.addSeconds(p.isha, 1))).isEqualTo(Prayer.NONE);
    }
  
  }