@Test
public void TestDateParsing() {

    Node metaDataNode = getMetadataNode();
    MathTransform transform = getMathTransform();
    Locale locale = new Locale("EN");
    CSWISORecordParser parser;
    try {
        parser = new CSWISORecordParser();
        CSWIsoRecord metadata = parser.parse(metaDataNode, locale, transform);
        JSONObject json = metadata.toJSON();
        assertEquals("2017-04-21T11:24Z", json.get("metadataDateStamp"));
    } catch (Exception e) {
        e.printStackTrace();
    }
}