CA-149027: Extract TRIM plugin call to a method

Signed-off-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>