Writing split() interface and its tests