Srs srs = new Srs();
srs.setDefaultRemotePart(new DomainPart("we.example.net"));
srs.setLocalDomains(localDomains);
srs.setSecretKey("19AF");
ReversePath originalReversePath =
new MailAddressFactory()
.createReversePathAlreadyVerified("SRS1=AAAA=forwarder.example.com==uwWh=2I=source.example.com=john@bouncer.example.net");
Recipient originalRecipient =
new MailAddressFactory()
.createRecipientAlreadyVerified("jane@we.example.net");
ReversePath newReversePath =
srs.forward(originalReversePath, originalRecipient);
assertEquals(
"SRS1=jdhx=forwarder.example.com==uwWh=2I=source.example.com=john@we.example.net",
newReversePath.getSmtpText());
}