public void TestGenerateNewId()
{
#pragma warning disable 618
// compare against two timestamps in case seconds since epoch changes in middle of test
var timestamp1 = (int)Math.Floor((DateTime.UtcNow - BsonConstants.UnixEpoch).TotalSeconds);
var objectId = BsonObjectId.GenerateNewId();
var timestamp2 = (int)Math.Floor((DateTime.UtcNow - BsonConstants.UnixEpoch).TotalSeconds);
Assert.IsTrue(objectId.Timestamp == timestamp1 || objectId.Timestamp == timestamp2);
Assert.IsTrue(objectId.Machine != 0);
Assert.IsTrue(objectId.Pid != 0);
#pragma warning restore
}