Updated TestRule class with assertions.