Adding more tests and fixing the existing ones for metadata summary handler
fixing small bug on using the defaultdict