Using snapshot for testing