Java Code Examples for java.util.Calendar.setTimeZone()

The following are Jave code examples for showing how to use setTimeZone() of the java.util.Calendar class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: jdk8u-jdk   File: TestJapaneseChronoImpl.java   View Source Code Vote up 7 votes
@Test(dataProvider="RangeVersusCalendar")
public void test_JapaneseChrono_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) {
    Locale locale = Locale.forLanguageTag("ja-JP-u-ca-japanese");
    assertEquals(locale.toString(), "ja_JP_#u-ca-japanese", "Unexpected locale");

    Calendar cal = java.util.Calendar.getInstance(locale);
    assertEquals(cal.getCalendarType(), "japanese", "Unexpected calendar type");

    JapaneseDate jDate = JapaneseChronology.INSTANCE.date(isoStartDate);

    // Convert to millis and set Japanese Calendar to that start date (at GMT)
    OffsetDateTime jodt = OffsetDateTime.of(isoStartDate, LocalTime.MIN, ZoneOffset.UTC);
    long millis = jodt.toInstant().toEpochMilli();
    cal.setTimeZone(TimeZone.getTimeZone("GMT+00"));
    cal.setTimeInMillis(millis);

    while (jDate.isBefore(isoEndDate)) {
        assertEquals(jDate.get(ChronoField.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + jDate + ";  cal: " + cal);
        assertEquals(jDate.get(ChronoField.MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in " + jDate);
        assertEquals(jDate.get(ChronoField.YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + jDate);

        jDate = jDate.plus(1, ChronoUnit.DAYS);
        cal.add(Calendar.DAY_OF_MONTH, 1);
    }
}
 
Example 2
Project: L-Assistant   File: ZhihuDailyFragment.java   View Source Code Vote up 6 votes
@Override
public void onResume() {
    super.onResume();
    mPresenter.start();
    Calendar c = Calendar.getInstance();
    c.setTimeZone(TimeZone.getTimeZone("GMT+08"));
    c.set(mYear, mMonth, mDay);
    setLoadingIndicator(mIsFirstLoad);
    if (mIsFirstLoad) {
        mPresenter.loadNews(true, false, c.getTimeInMillis());
        mIsFirstLoad = false;
    } else {
        mPresenter.loadNews(false, false, c.getTimeInMillis());
    }

}
 
Example 3
Project: alog   File: Time.java   View Source Code Vote up 6 votes
/**
 * Attempts to reuse a calendar instance, the timezone will be set to
 * TimeZone.getDefault().
 */
public static Calendar getCalendar() {
    Calendar cal = null;
    synchronized (Time.class) {
        if (calendarCache1 != null) {
            cal = calendarCache1;
            calendarCache1 = null;
        } else if (calendarCache2 != null) {
            cal = calendarCache2;
            calendarCache2 = null;
        }
    }
    if (cal == null) {
        cal = Calendar.getInstance();
    } else {
        cal.setTimeZone(TimeZone.getDefault());
    }
    return cal;
}
 
Example 4
Project: aws-sdk-java-v2   File: Aws4SignerTest.java   View Source Code Vote up 6 votes
/**
 * Tests that if passed anonymous credentials, signer will not generate a signature.
 */
@Test
public void testAnonymous() throws Exception {
    AwsCredentials credentials = AnonymousCredentialsProvider.create().getCredentials();
    SdkHttpFullRequest request = generateBasicRequest().build();

    Calendar c = new GregorianCalendar();
    c.set(1981, 1, 16, 6, 30, 0);
    c.setTimeZone(TimeZone.getTimeZone("UTC"));
    signer.setServiceName("demo");
    signer.setOverrideDate(c.getTime());

    SignerTestUtils.signRequest(signer, request, credentials);

    assertNull(request.headers().get("Authorization"));
}
 
Example 5
Project: aws-sdk-java-v2   File: Aws4SignerTest.java   View Source Code Vote up 6 votes
/**
 * x-amzn-trace-id should not be signed as it may be mutated by proxies or load balancers.
 */
@Test
public void xAmznTraceId_NotSigned() throws Exception {
    AwsCredentials credentials = new AwsCredentials("akid", "skid");
    SdkHttpFullRequest.Builder request = generateBasicRequest();
    request.header("X-Amzn-Trace-Id", " Root=1-584b150a-708479cb060007ffbf3ee1da;Parent=36d3dbcfd150aac9;Sampled=1");

    Calendar c = new GregorianCalendar();
    c.set(1981, 1, 16, 6, 30, 0);
    c.setTimeZone(TimeZone.getTimeZone("UTC"));
    signer.setServiceName("demo");
    signer.setOverrideDate(c.getTime());

    SdkHttpFullRequest actual = SignerTestUtils.signRequest(signer, request.build(), credentials);

    assertThat(actual.firstMatchingHeader("Authorization"))
            .hasValue("AWS4-HMAC-SHA256 Credential=akid/19810216/us-east-1/demo/aws4_request, " +
                      "SignedHeaders=host;x-amz-archive-description;x-amz-date, " +
                      "Signature=581d0042389009a28d461124138f1fe8eeb8daed87611d2a2b47fd3d68d81d73");
}
 
Example 6
Project: lams   File: CronSequenceGenerator.java   View Source Code Vote up 6 votes
/**
 * Get the next {@link Date} in the sequence matching the Cron pattern and
 * after the value provided. The return value will have a whole number of
 * seconds, and will be after the input value.
 * @param date a seed value
 * @return the next value matching the pattern
 */
public Date next(Date date) {
	/*
	The plan:

	1 Round up to the next whole second

	2 If seconds match move on, otherwise find the next match:
	2.1 If next match is in the next minute then roll forwards

	3 If minute matches move on, otherwise find the next match
	3.1 If next match is in the next hour then roll forwards
	3.2 Reset the seconds and go to 2

	4 If hour matches move on, otherwise find the next match
	4.1 If next match is in the next day then roll forwards,
	4.2 Reset the minutes and seconds and go to 2

	...
	*/

	Calendar calendar = new GregorianCalendar();
	calendar.setTimeZone(this.timeZone);
	calendar.setTime(date);

	// First, just reset the milliseconds and try to calculate from there...
	calendar.set(Calendar.MILLISECOND, 0);
	long originalTimestamp = calendar.getTimeInMillis();
	doNext(calendar, calendar.get(Calendar.YEAR));

	if (calendar.getTimeInMillis() == originalTimestamp) {
		// We arrived at the original timestamp - round up to the next whole second and try again...
		calendar.add(Calendar.SECOND, 1);
		doNext(calendar, calendar.get(Calendar.YEAR));
	}

	return calendar.getTime();
}
 
Example 7
Project: ibm-cos-sdk-java   File: AWS4SignerTest.java   View Source Code Vote up 6 votes
/**
 * Tests that if passed anonymous credentials, signer will not generate a signature
 */
@Test
public void testAnonymous() throws Exception {
    AWSCredentials credentials = new AnonymousAWSCredentials();
    SignableRequest<?> request = generateBasicRequest();

    Calendar c = new GregorianCalendar();
    c.set(1981, 1, 16, 6, 30, 0);
    c.setTimeZone(TimeZone.getTimeZone("UTC"));
    signer.setServiceName("demo");
    signer.setOverrideDate(c.getTime());

    signer.sign(request, credentials);

    assertNull(request.getHeaders().get("Authorization"));
}
 
Example 8
Project: aws-sdk-java-v2   File: Aws4SignerTest.java   View Source Code Vote up 6 votes
@Test
public void queryParamsWithNullValuesAreStillSignedWithTrailingEquals() throws Exception {
    final String expectedAuthorizationHeaderWithoutSha256Header =
            "AWS4-HMAC-SHA256 Credential=access/19810216/us-east-1/demo/aws4_request, " +
            "SignedHeaders=host;x-amz-archive-description;x-amz-date, " +
            "Signature=c45a3ff1f028e83017f3812c06b4440f0b3240264258f6e18cd683b816990ba4";

    AwsCredentials credentials = new AwsCredentials("access", "secret");
    // Test request without 'x-amz-sha256' header
    SdkHttpFullRequest.Builder request = generateBasicRequest().rawQueryParameter("Foo", (String) null);

    Calendar calendar = new GregorianCalendar();
    calendar.set(1981, 1, 16, 6, 30, 0);
    calendar.setTimeZone(TimeZone.getTimeZone("UTC"));

    signer.setOverrideDate(calendar.getTime());
    signer.setServiceName("demo");

    SdkHttpFullRequest signed = SignerTestUtils.signRequest(signer, request.build(), credentials);
    assertThat(signed.firstMatchingHeader("Authorization"))
            .hasValue(expectedAuthorizationHeaderWithoutSha256Header);
}
 
Example 9
Project: lemon-framework   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 获取当前时间戳
 */
   public static long getTimestamp() {
	TimeZone time = TimeZone.getTimeZone("GMT+8"); //设置为东八区
	Calendar calendar = Calendar.getInstance();
	calendar.setTimeZone(time);
	return calendar.getTimeInMillis() / 1000;
}
 
Example 10
Project: dagger-test-example   File: DateProvider.java   View Source Code Vote up 5 votes
public Calendar parse(String strDate) throws ParseException
{
    DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    dateFormat.setTimeZone(TimeZone.getTimeZone("Europe/Berlin"));

    Calendar parsedDate = Calendar.getInstance(Locale.GERMANY);
    parsedDate.setTimeZone(TimeZone.getTimeZone("Europe/Berlin"));
    parsedDate.setTime(dateFormat.parse(strDate));

    return parsedDate;
}
 
Example 11
Project: logistimo-web-service   File: SMSBuilder.java   View Source Code Vote up 5 votes
/**
 * Method to set details to the transaction object
 *
 * @param mobileTransModel      Mobile transaction model
 * @param ua                    User Account
 * @param kioskId               Kiosk ID
 * @param actualTransactionDate Actual Transaction Date
 * @param materialId            Material ID
 * @return ITransaction
 * @throws ParseException          when unable to parse date
 * @throws ServiceException        Exception thrown from Service Layer
 */
private ITransaction setTransactionDetails(MobileTransModel mobileTransModel, IUserAccount ua,
                                           Long kioskId, Long actualTransactionDate,
                                           Long materialId) throws
    ParseException, ServiceException {
  ITransaction transaction = JDOUtils.createInstance(ITransaction.class);
  transaction.setKioskId(kioskId);
  transaction.setType(mobileTransModel.ty);
  transaction.setBatchId(mobileTransModel.bid);
  if (transaction.hasBatch()) {
    transaction.setOpeningStockByBatch(mobileTransModel.ostk);
  } else {
    transaction.setOpeningStock(mobileTransModel.ostk);
  }
  transaction.setQuantity(mobileTransModel.q);
  transaction.setSourceUserId(ua.getUserId());
  if (actualTransactionDate != null) {
    Date d = LocalDateUtil.parseCustom(mobileTransModel.atd, Constants.DATE_FORMAT, null);
    transaction.setAtd(d);
  }
  transaction.setTimestamp(new Date());

  Calendar calendar = Calendar.getInstance();
  TimeZone timeZone = SMSUtil.getUserTimeZone(ua);
  if (timeZone != null) {
    calendar.setTimeZone(timeZone);
  }
  calendar.setTimeInMillis(mobileTransModel.entm);
  transaction.setEntryTime(calendar.getTime());
  calendar.setTimeInMillis(mobileTransModel.sortEtm);
  transaction.setSortEt(calendar.getTime());
  if (mobileTransModel.lkid != null) {
    transaction.setLinkedKioskId(mobileTransModel.lkid);
  }
  transaction.setSrc(SourceConstants.SMS);
  transaction.setMaterialId(materialId);
  return transaction;
}
 
Example 12
Project: mbed-cloud-sdk-java   File: TestTranslationUtils.java   View Source Code Vote up 5 votes
@Test
public void testToRFC3339Timestamp() {
    String timestamp = "2017-08-11T17:33:35.000Z";
    Calendar calendar = Calendar.getInstance();
    calendar.setTimeZone(TimeZone.getTimeZone("CET"));
    calendar.set(2017, 7, 11, 19, 33, 35);
    calendar.set(Calendar.MILLISECOND, 0);
    Date datetime = calendar.getTime();
    assertEquals(timestamp, TranslationUtils.toUtcTimestamp(datetime));
}
 
Example 13
Project: openjdk-jdk10   File: CalendarRegression.java   View Source Code Vote up 5 votes
/**
 * Calendar does not update field values when setTimeZone is called.
 */
public void Test4177484() {
    TimeZone PST = TimeZone.getTimeZone("PST");
    TimeZone EST = TimeZone.getTimeZone("EST");

    Calendar cal = Calendar.getInstance(PST, Locale.US);
    cal.clear();
    cal.set(1999, 3, 21, 15, 5, 0); // Arbitrary
    int h1 = cal.get(HOUR_OF_DAY);
    cal.setTimeZone(EST);
    int h2 = cal.get(HOUR_OF_DAY);
    if (h1 == h2) {
        errln("FAIL: Fields not updated after setTimeZone");
    }

    // getTime() must NOT change when time zone is changed.
    // getTime() returns zone-independent time in ms.
    cal.clear();
    cal.setTimeZone(PST);
    cal.set(HOUR_OF_DAY, 10);
    Date pst10 = cal.getTime();
    cal.setTimeZone(EST);
    Date est10 = cal.getTime();
    if (!pst10.equals(est10)) {
        errln("FAIL: setTimeZone changed time");
    }
}
 
Example 14
Project: OpenDA   File: EfdcRestartFileTest.java   View Source Code Vote up 5 votes
public void testWriteEfdcRestartFile2() {
    Calendar calendar = Calendar.getInstance();
    calendar.setTimeZone(TimeZone.getTimeZone("GMT"));

    calendar.set(2009, 4, 23, 9, 0, 0);
    calendar.set(Calendar.MILLISECOND, 0);
    double startDate = Time.milliesToMjd(calendar.getTimeInMillis());

    EfdcRestartFileIoObject efdcRestartFileIoObject = new EfdcRestartFileIoObject();
    //working directory (testRunDataDir) is openda_public/opendaTestRuns/model_efdc/org/openda/model_efdc
    String efdcRestartFilename = "efdcRestartFileTest/input/RESTART2.INP";
    String startTimeExchangeItemId = "TSTART1";
    efdcRestartFileIoObject.initialize(testRunDataDir, efdcRestartFilename,
            new String[]{"0", startTimeExchangeItemId});

    //Get all exchangeItems items
    IPrevExchangeItem[] exchangeItems = efdcRestartFileIoObject.getExchangeItems();
    //Loop over all exchangeItems items and request the ID, name and value
    for (IPrevExchangeItem exchangeItem : exchangeItems) {
        String id = exchangeItem.getId();
        if (id.equals(startTimeExchangeItemId)) {
            exchangeItem.setValues(startDate);
        }
    }

    //This command actually replaces the startTime in the restart file.
    efdcRestartFileIoObject.finish();

    //compare actual result file with expected result file.
    File actualOutputFile = new File(testRunDataDir, efdcRestartFilename);
    //working directory (testRunDataDir) is openda_public/opendaTestRuns/model_efdc/org/openda/model_efdc
    File expectedOutputFile = new File(testRunDataDir, "efdcRestartFileTest/expectedResult/RESTART2.INP");
    assertTrue(testData.FilesAreIdentical(expectedOutputFile, actualOutputFile, 0));
}
 
Example 15
Project: myfaces-trinidad   File: DatePropertyTagRule.java   View Source Code Vote up 5 votes
static private Date _coerceToDate(String str, boolean adjustToEnd)
{
  if (str == null)
    return null;
  
  try
  {
    Date date = _getDateFormat().parse(str);
    
    // This code is taken from UIXComponentELTag
    // We should probably not do the ajustment here,
    // but instead be smarter when days are compared.
    if (adjustToEnd)
    {
      Calendar c = Calendar.getInstance();
      TimeZone tz = RequestContext.getCurrentInstance().getTimeZone();
      if (tz != null)
        c.setTimeZone(tz);
      c.setTime(date);
      // Original value had 00:00:00 for hours,mins, seconds now maximize those
      // to get the latest time value for the date supplied.
      c.set (Calendar.HOUR_OF_DAY, 23);
      c.set (Calendar.MINUTE, 59);
      c.set (Calendar.SECOND, 59);
      c.set (Calendar.MILLISECOND, 999);
    }
    
    return date;
  }
  catch (ParseException pe)
  {
    _LOG.info("CANNOT_PARSE_VALUE_INTO_DATE", str);
    return null;
  }
}
 
Example 16
Project: Remindy   File: CalendarUtil.java   View Source Code Vote up 5 votes
public static void copyCalendar(Calendar copyFrom, Calendar copyTo) {
    if(copyFrom == null || copyTo == null)
        throw new NullPointerException("copyCalendar(), One of both parameters are null");

    copyTo.setTimeZone(copyFrom.getTimeZone());
    copyTo.setTimeInMillis(copyFrom.getTimeInMillis());
}
 
Example 17
Project: OpenDA   File: UciFileTest.java   View Source Code Vote up 5 votes
public void testWriteUciFileWithExtendedPeriod() {
    Calendar calendar = Calendar.getInstance();
    calendar.setTimeZone(TimeZone.getTimeZone("GMT"));

    calendar.set(2007, 0, 1, 0, 0, 0);
    calendar.set(Calendar.MILLISECOND, 0);
    double startDate = Time.milliesToMjd(calendar.getTimeInMillis());
    calendar.set(2007, 0, 5, 9, 0, 0);
    calendar.set(Calendar.MILLISECOND, 0);
    double stopDate = Time.milliesToMjd(calendar.getTimeInMillis());

    UciIoObject uciIoObject = new UciIoObject();
    String uciFilename = "uciFileTest/input/ndriver_extended_period.uci";
    String[] arguments = new String[]{"0", "TSTART", "TSTOP", "-43800"};
    uciIoObject.initialize(testRunDataDir, uciFilename, arguments);

    //Get all exchangeItems items
    IPrevExchangeItem[] exchangeItems = uciIoObject.getExchangeItems();
    assertEquals(2, exchangeItems.length);

    //Loop over all exchangeItems items and request the ID, name and value
    for (IPrevExchangeItem exchangeItem : exchangeItems) {
        String id = exchangeItem.getId();
        if ("TSTART".equals(id)) {
            exchangeItem.setValues(startDate);
        } else if ("TSTOP".equals(id)) {
            exchangeItem.setValues(stopDate);
        }
    }

    //This command actually replaces the tags in the uci file by the values
    //of the corresponding exchangeItems.
    uciIoObject.finish();

    //compare actual result file with expected result file.
    File actualOutputFile = new File(testRunDataDir, uciFilename);
    File expectedOutputFile = new File(testRunDataDir, "uciFileTest/expectedResult/ndriver_extended_period_expected.uci");
    assertTrue(testData.FilesAreIdentical(expectedOutputFile, actualOutputFile, 0));
}
 
Example 18
Project: amap   File: MIP_TimeUtils.java   View Source Code Vote up 5 votes
/**
 * 获取当前日期和星期 <一句话功能简述>
 * 
 * @Description<功能详细描述>
 * 
 * @return
 * @LastModifiedDate:2017-6-7
 * @author zxm
 * @EditHistory:<修改内容><修改人>
 */
public static String StringDataAndWeek()
{
    final Calendar c = Calendar.getInstance();
    c.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
    mYear = String.valueOf(c.get(Calendar.YEAR)); // 获取当前年份
    mMonth = String.valueOf(c.get(Calendar.MONTH) + 1);// 获取当前月份
    mDay = String.valueOf(c.get(Calendar.DAY_OF_MONTH));// 获取当前月份的日期号码
    mWay = String.valueOf(c.get(Calendar.DAY_OF_WEEK));
    if ("1".equals(mWay))
    {
        mWay = "天";
    }
    else if ("2".equals(mWay))
    {
        mWay = "一";
    }
    else if ("3".equals(mWay))
    {
        mWay = "二";
    }
    else if ("4".equals(mWay))
    {
        mWay = "三";
    }
    else if ("5".equals(mWay))
    {
        mWay = "四";
    }
    else if ("6".equals(mWay))
    {
        mWay = "五";
    }
    else if ("7".equals(mWay))
    {
        mWay = "六";
    }
    return mYear + "年" + mMonth + "月" + mDay + "日" + "\t星期" + mWay;
}
 
Example 19
Project: neoscada   File: PatternTimestampParser.java   View Source Code Vote up 4 votes
@Override
public Calendar parseTimestamp ( final ByteBuf data )
{
    final int index = data.bytesBefore ( this.endMarker );
    if ( index < 0 )
    {
        throw new CodecException ( "Unable to find timestamp" );
    }

    final String timestampString = data.readSlice ( index ).toString ( this.charset );

    logger.debug ( "Timestamp string: '{}'", timestampString );

    final Matcher m = this.pattern.matcher ( timestampString );
    if ( !m.matches () )
    {
        throw new CodecException ( "Timestamp string does not match pattern: " + this.pattern.pattern () );
    }

    final int year = Integer.parseInt ( m.group ( "year" ) );
    final int month = Integer.parseInt ( m.group ( "month" ) ) - 1;
    final int day = Integer.parseInt ( m.group ( "day" ) );
    final int hour = Integer.parseInt ( m.group ( "hour" ) );
    final int minute = Integer.parseInt ( m.group ( "minute" ) );
    final int second = Integer.parseInt ( m.group ( "second" ) );
    final int ms = Integer.parseInt ( m.group ( "subsec" ) ) / 1000;

    TimeZone timezone = TimeZone.getDefault ();
    final String tz = m.group ( "tz" );
    if ( !tz.isEmpty () )
    {
        // FIXME: implement
        if ( "Z".equals ( tz ) )
        {
            timezone = TimeZone.getTimeZone ( "UTC" );
        }
        else
        {
            timezone = TimeZone.getTimeZone ( "GMT" + tz );
        }
    }

    final Calendar c = new GregorianCalendar ( year, month, day, hour, minute, second );
    c.setTimeZone ( timezone );
    c.set ( Calendar.MILLISECOND, ms );

    // skip marker byte
    data.skipBytes ( 1 );

    return c;
}
 
Example 20
Project: OpenDA   File: EfdcEventTox2InpFileTest.java   View Source Code Vote up 4 votes
public void testWriteEfdcEventTox2InpFile() {
    Calendar calendar = Calendar.getInstance();
    calendar.setTimeZone(TimeZone.getTimeZone("GMT"));

    calendar.set(2009, 0, 1, 9, 0, 0);
    calendar.set(Calendar.MILLISECOND, 0);
    double startDate = Time.milliesToMjd(calendar.getTimeInMillis());
    calendar.set(2009, 0, 3, 9, 0, 0);
    calendar.set(Calendar.MILLISECOND, 0);
    double endDate = Time.milliesToMjd(calendar.getTimeInMillis());

    EfdcEventTox2InpIoObject efdcEventTox2InpIoObject = new EfdcEventTox2InpIoObject();
    //working directory (testRunDataDir) is openda_public/opendaTestRuns/model_efdc/org/openda/model_efdc
    String eventTox2InpFilename = "efdcEventTox2InpFileTest/input/EVENT_TOX2.INP";
    String startTimeExchangeItemId = "TSTART1";
    String endTimeExchangeItemId = "TSTOP1";
    efdcEventTox2InpIoObject.initialize(testRunDataDir, eventTox2InpFilename,
            new String[]{"0", startTimeExchangeItemId, endTimeExchangeItemId});

    //Get all exchangeItems items
    IPrevExchangeItem[] exchangeItems = efdcEventTox2InpIoObject.getExchangeItems();
    //Loop over all exchangeItems items and request the ID, name and value
    for (IPrevExchangeItem exchangeItem : exchangeItems) {
        String id = exchangeItem.getId();
        if (id.equals(startTimeExchangeItemId)) {
            exchangeItem.setValues(startDate);
        } else if (id.equals(endTimeExchangeItemId)) {
            exchangeItem.setValues(endDate);
        }
    }

    //This command actually replaces the tags in the file by the values
    //of the corresponding exchangeItems.
    efdcEventTox2InpIoObject.finish();

    //compare actual result file with expected result file.
    File actualOutputFile = new File(testRunDataDir, eventTox2InpFilename);
    //working directory (testRunDataDir) is openda_public/opendaTestRuns/model_efdc/org/openda/model_efdc
    File expectedOutputFile = new File(testRunDataDir, "efdcEventTox2InpFileTest/expectedResult/EVENT_TOX2.INP");
    assertTrue(testData.FilesAreIdentical(expectedOutputFile, actualOutputFile, 0));
}