Although I have not tested this, you could investigate if the following setup work: in the the unit test microflow you retrieve the anonymous user from the database and then call the CommunityCommons Java action ExecutureMicroflowAsUser. That microflow returns a string, hopefully with a meaningful result that you can use to check the output of the microflow you executed.