@Test
public void testTimeForPrayer() {

  DateComponents components = new DateComponents(2016, 7, 1);
  CalculationParameters parameters = CalculationMethod.MUSLIM_WORLD_LEAGUE.getParameters();
  parameters.madhab = Madhab.HANAFI;
  parameters.highLatitudeRule = HighLatitudeRule.TWILIGHT_ANGLE;
  Coordinates coordinates = new Coordinates(59.9094, 10.7349);
  PrayerTimes p = new PrayerTimes(coordinates, components, parameters);
  assertThat(p.fajr).isEqualTo(p.timeForPrayer(Prayer.FAJR));
  assertThat(p.sunrise).isEqualTo(p.timeForPrayer(Prayer.SUNRISE));
  assertThat(p.dhuhr).isEqualTo(p.timeForPrayer(Prayer.DHUHR));
  assertThat(p.asr).isEqualTo(p.timeForPrayer(Prayer.ASR));
  assertThat(p.maghrib).isEqualTo(p.timeForPrayer(Prayer.MAGHRIB));
  assertThat(p.isha).isEqualTo(p.timeForPrayer(Prayer.ISHA));
  assertThat(p.timeForPrayer(Prayer.NONE)).isNull();
}