In this article we examine a breakdown model in which the system's status can be determined only by a test. Upon detection of failure the system must be replaced by a new identical one. The costs incurred include cost of inspection, operating costs, failure cost and a cost associated with planned replacements. Throughout the paper we restrict attention to replacement rules in which the time interval between two successive inspections is regarded as a fixed quantity. The decision variables include the inspection interval and the scheduling for preventive (planned) replacements. The problem is to specify a replacement rule which minimizes the long-run average cost per unit time. We show that under certain monotone conditions there is a natural candidate for an optimal replacement rule.