private void testDate(long dateInMilliSeconds) {
        String serverSpecificDateFormat = DateUtils
                .formatServiceSpecificDate(new Date(dateInMilliSeconds));

        Date parsedDate = DateUtils.parseServiceSpecificDate(String
                .valueOf(serverSpecificDateFormat));

        assertEquals(Long.valueOf(dateInMilliSeconds),
                Long.valueOf(parsedDate.getTime()));

    }
Tests the Date marshalling and unmarshalling. Asserts that the value is
same before and after marshalling/unmarshalling
aws-java-sdk-core/src/test/java/com/amazonaws/util/DateUtilsTest.java