Test code for mutex.