(Some) Tests for "Expiration Date" of File Sharing

Related to #4649

There are more things to do, but I am pull requesting this now because I have to go and this is in mergable state.

@bartv2 @DeepDiver1975 @ringmaster @schiesbn @icewind1991