SOC-2115 | Improve Profile class: re-write inner class & add more junit test