Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(
new ProtectionAbility(filter), Duration.EndOfTurn), new ManaCostsImpl("{1}{W}"));
ability1.addTarget(new TargetControlledPermanent());
this.addAbility(ability1);
// {1}: Target spell or permanent becomes white until end of turn.
Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SetCardColorTargetEffect(
ObjectColor.WHITE, Duration.EndOfTurn),new ManaCostsImpl("{1}"));
ability2.addTarget(new TargetSpellOrPermanent());
this.addAbility(ability2);
}