While successful predation results in a gain of energy, hunting invariably involves energetic costs as well. When hunger is not an issue, in general most predators will not seek to attack prey since the costs outweigh the benefits. For instance, a large predatory fish like a shark that is well fed in an aquarium will typically ignore the smaller fish swimming around it (while the prey fish take advantage of the fact that the apex predator is apparently uninterested). Surplus killing represents a deviation from this type of behaviour. The treatment of consumption in terms of cost-benefit analysis is known as optimal foraging theory, and has been quite successful in the study of animal behavior. In general, costs and benefits are considered in energy gain per unit time, though other factors are also important, such as essential nutrients that have no caloric value but are necessary for survival and health.