def METHOD_NAME(self):
    """Serializer should extract extension from the key parameter."""
    resource_id, object_id = uuid4(), uuid4()
    valid_data = {
        "key": f"{resource_id}/document/{object_id}/1533686400.pdf",
        "state": "ready",
        "extraParameters": {"foo": "bar"},
    }
    serializer = UpdateStateSerializer(data=valid_data)
    self.assertTrue(serializer.is_valid())
    self.assertEqual(
        serializer.get_key_elements(),
        {
            "extension": "pdf",
            "model_name": "document",
            "object_id": str(object_id),
            "stamp": "1533686400",
            "uploaded_on": datetime(2018, 8, 8, tzinfo=timezone.utc),
        },
    )