Added test for gain lookup.