DefaultIndexHandler is refactored and unit test is added.