Adjusted test to use Calendar instead of Date to pass PMD