A ground fault interrupt outlet is now required by building codes for outlets within six feet of a sink or in any other environment where water could be close to the outlet. Normally the currents in the black and white wires will be equal, but if the water provides an alternative current path, then the two currents will no longer be the same. The GFI detects this difference and shuts off the circuit within milliseconds. GFIs should be tested periodically to make sure the electronic circuit is still working.