Add pattern metod in void DecodeToMap and TestCase for check