[PLAT-3794] Refactored into separate methods to fix checkstyle method length warning