[CB-3991] Added unit tests for Media plugin