Extracted general utility methods from BamWindowReadTest and put them
here.