feat(ses): add SendBulkEmail (v2) and SendBulkTemplatedEmail (v1) (#645)

* feat(ses): add SendBulkEmail (v2) and SendBulkTemplatedEmail (v1)

Adds bulk templated email support for both the SES v1 Query API
(SendBulkTemplatedEmail) and the SES v2 REST JSON API
(POST /v2/email/outbound-bulk-emails). The two endpoints share a
single SesService.sendBulkTemplatedEmail method that resolves the
template upfront, merges DefaultTemplateData with each entry's
ReplacementTemplateData at the JSON-key level (replacement wins),
renders subject/text/html via the existing applyTemplateData helper,
and reuses sendEmail per destination so each successful entry appears
in the existing /_aws/ses inspection mailbox with a unique MessageId.

Per-entry results are returned in the BulkEmailEntryResult shape with
status mapped to the AWS wire format expected by each protocol
(CamelCase for v1, SCREAMING_SNAKE for v2). Per-entry AwsException
codes are mapped to the closest BulkEmailEntryResult.Status (e.g.
InvalidParameterValue -> INVALID_PARAMETER, which renders as
"InvalidParameterValue" on v1), falling back to FAILED for unexpected
exceptions.

Template lookup failures and account-sending-paused conditions are
top-level errors on both protocols, with v1 raising
AccountSendingPausedException to match AWS semantics.

* fix(ses): enforce account sending check in v1 SendEmail/SendRawEmail/SendTemplatedEmail

v1 Query SES handlers previously sent mail even when account-level
sending was disabled, while v2 REST JSON handlers and the new
SendBulkTemplatedEmail correctly return AccountSendingPausedException.
Add the same guard at the top of handleSendEmail, handleSendRawEmail,
and handleSendTemplatedEmail to align v1 with v2 and AWS semantics.
This commit is contained in:
Kenshin Okinaka authored and GitHub committed 2026-04-29 17:28:09 -05:00
1 parent cb0a82b749
commit 44eb8d2379
13 files changed
+1233 -1

No files matched your search

@@ -0,0 +1,254 @@
package io.github.hectorvent.floci.services.ses;
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
/**
* Integration tests for SES V1 Query-protocol SendBulkTemplatedEmail.
*/
@QuarkusTest
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
class SesBulkV1IntegrationTest {
private static final String AUTH =
"AWS4-HMAC-SHA256 Credential=AKID/20260101/us-east-1/email/aws4_request";
private static final Pattern MESSAGE_ID_PATTERN =
Pattern.compile("<MessageId>([^<]+)</MessageId>");
@Test
@Order(1)
void createTemplate() {
given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "CreateTemplate")
.formParam("Template.TemplateName", "v1-bulk-welcome")
.formParam("Template.SubjectPart", "Hello {{name}}")
.formParam("Template.TextPart", "Hi {{name}}, team {{team}}!")
.formParam("Template.HtmlPart", "<p>Hi <b>{{name}}</b> ({{team}})</p>")
.when()
.post("/")
.then()
.statusCode(200);
}
@Test
@Order(2)
void sendBulkTemplatedEmail_perDestinationReplacement() {
String body = given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendBulkTemplatedEmail")
.formParam("Source", "bulk@example.com")
.formParam("Template", "v1-bulk-welcome")
.formParam("DefaultTemplateData", "{\"team\":\"floci\"}")
.formParam("Destinations.member.1.Destination.ToAddresses.member.1", "alice@example.com")
.formParam("Destinations.member.1.ReplacementTemplateData", "{\"name\":\"Alice\"}")
.formParam("Destinations.member.2.Destination.ToAddresses.member.1", "bob@example.com")
.formParam("Destinations.member.2.ReplacementTemplateData", "{\"name\":\"Bob\",\"team\":\"override\"}")
.when()
.post("/")
.then()
.statusCode(200)
.body(containsString("SendBulkTemplatedEmailResponse"))
.extract().body().asString();
long successCount = body.split("<Status>Success</Status>", -1).length - 1L;
assertEquals(2L, successCount, "expected two Success entries");
List<String> messageIds = new ArrayList<>();
Matcher m = MESSAGE_ID_PATTERN.matcher(body);
while (m.find()) {
messageIds.add(m.group(1));
}
assertEquals(2, messageIds.size(), "expected two MessageIds");
assertNotEquals(messageIds.get(0), messageIds.get(1), "MessageIds must be unique");
// First entry inherits team=floci from defaults; second overrides.
given()
.queryParam("id", messageIds.get(0))
.when()
.get("/_aws/ses")
.then()
.statusCode(200)
.body("messages[0].Subject", equalTo("Hello Alice"))
.body("messages[0].Body.text_part", equalTo("Hi Alice, team floci!"));
given()
.queryParam("id", messageIds.get(1))
.when()
.get("/_aws/ses")
.then()
.statusCode(200)
.body("messages[0].Subject", equalTo("Hello Bob"))
.body("messages[0].Body.text_part", equalTo("Hi Bob, team override!"));
}
@Test
@Order(3)
void sendBulkTemplatedEmail_unknownTemplate() {
given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendBulkTemplatedEmail")
.formParam("Source", "bulk@example.com")
.formParam("Template", "ghost")
.formParam("Destinations.member.1.Destination.ToAddresses.member.1", "alice@example.com")
.when()
.post("/")
.then()
.statusCode(400)
.body(containsString("<Code>TemplateDoesNotExist</Code>"));
}
@Test
@Order(4)
void sendBulkTemplatedEmail_missingDestinations() {
given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendBulkTemplatedEmail")
.formParam("Source", "bulk@example.com")
.formParam("Template", "v1-bulk-welcome")
.when()
.post("/")
.then()
.statusCode(400)
.body(containsString("<Code>InvalidParameterValue</Code>"));
}
@Test
@Order(5)
void sendBulkTemplatedEmail_missingTemplate() {
given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendBulkTemplatedEmail")
.formParam("Source", "bulk@example.com")
.formParam("Destinations.member.1.Destination.ToAddresses.member.1", "alice@example.com")
.when()
.post("/")
.then()
.statusCode(400)
.body(containsString("<Code>InvalidParameterValue</Code>"));
}
@Test
@Order(6)
void sendBulkTemplatedEmail_perEntryMissingDestination_mapsToInvalidParameterValue() {
// An entry with only ReplacementTemplateData (no recipient) reaches sendEmail,
// which throws AwsException("InvalidParameterValue", ...). Expected per-entry
// Status string in v1 is "InvalidParameterValue", not "Failed" or "InvalidParameter".
String body = given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendBulkTemplatedEmail")
.formParam("Source", "bulk@example.com")
.formParam("Template", "v1-bulk-welcome")
.formParam("Destinations.member.1.ReplacementTemplateData", "{\"name\":\"Ghost\"}")
.when()
.post("/")
.then()
.statusCode(200)
.extract().body().asString();
assertEquals(1L, body.split("<Status>InvalidParameterValue</Status>", -1).length - 1L,
"expected per-entry Status=InvalidParameterValue");
}
@Test
@Order(7)
void sendBulkTemplatedEmail_accountSendingPaused_returnsTopLevelError() {
// Disable account sending via the v2 endpoint, then expect v1 SendBulkTemplatedEmail
// to fail with AccountSendingPausedException without sending any mail.
try {
given()
.contentType("application/json")
.body("{\"SendingEnabled\":false}")
.when()
.put("/v2/email/account/sending")
.then()
.statusCode(200);
given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendBulkTemplatedEmail")
.formParam("Source", "bulk@example.com")
.formParam("Template", "v1-bulk-welcome")
.formParam("Destinations.member.1.Destination.ToAddresses.member.1", "alice@example.com")
.when()
.post("/")
.then()
.statusCode(400)
.body(containsString("<Code>AccountSendingPausedException</Code>"));
} finally {
given()
.contentType("application/json")
.body("{\"SendingEnabled\":true}")
.when()
.put("/v2/email/account/sending")
.then()
.statusCode(200);
}
}
@Test
@Order(8)
void sendBulkTemplatedEmail_destinationsExceeds50_returnsMessageRejected() {
var spec = given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendBulkTemplatedEmail")
.formParam("Source", "bulk@example.com")
.formParam("Template", "v1-bulk-welcome");
for (int i = 1; i <= 51; i++) {
spec = spec.formParam(
"Destinations.member." + i + ".Destination.ToAddresses.member.1",
"user" + i + "@example.com");
}
spec
.when()
.post("/")
.then()
.statusCode(400)
.body(containsString("<Code>MessageRejected</Code>"));
}
@Test
@Order(9)
void sendBulkTemplatedEmail_recipientsExceeds50_returnsMessageRejected() {
var spec = given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendBulkTemplatedEmail")
.formParam("Source", "bulk@example.com")
.formParam("Template", "v1-bulk-welcome");
for (int i = 1; i <= 51; i++) {
spec = spec.formParam(
"Destinations.member.1.Destination.ToAddresses.member." + i,
"user" + i + "@example.com");
}
spec
.when()
.post("/")
.then()
.statusCode(400)
.body(containsString("<Code>MessageRejected</Code>"));
}
}
@@ -0,0 +1,313 @@
package io.github.hectorvent.floci.services.ses;
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.notNullValue;
/**
* Integration tests for SES V2 SendBulkEmail at /v2/email/outbound-bulk-emails.
*/
@QuarkusTest
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
class SesBulkV2IntegrationTest {
private static final String AUTH_HEADER =
"AWS4-HMAC-SHA256 Credential=AKID/20260101/us-east-1/ses/aws4_request";
@Test
@Order(1)
void createTemplate() {
given()
.contentType("application/json")
.header("Authorization", AUTH_HEADER)
.body("""
{
"TemplateName": "v2-bulk-welcome",
"TemplateContent": {
"Subject": "Hello {{name}}",
"Text": "Hi {{name}}, team {{team}}!",
"Html": "<p>Hi <b>{{name}}</b> ({{team}})</p>"
}
}
""")
.when()
.post("/v2/email/templates")
.then()
.statusCode(200);
}
@Test
@Order(2)
void sendBulkEmail_storedTemplate_perEntryReplacement() {
String firstId = given()
.contentType("application/json")
.header("Authorization", AUTH_HEADER)
.body("""
{
"FromEmailAddress": "bulk@example.com",
"DefaultContent": {
"Template": {
"TemplateName": "v2-bulk-welcome",
"TemplateData": "{\\"team\\":\\"floci\\"}"
}
},
"BulkEmailEntries": [
{
"Destination": {"ToAddresses": ["alice@example.com"]},
"ReplacementEmailContent": {
"ReplacementTemplate": {
"ReplacementTemplateData": "{\\"name\\":\\"Alice\\"}"
}
}
},
{
"Destination": {"ToAddresses": ["bob@example.com"]},
"ReplacementEmailContent": {
"ReplacementTemplate": {
"ReplacementTemplateData": "{\\"name\\":\\"Bob\\",\\"team\\":\\"override\\"}"
}
}
}
]
}
""")
.when()
.post("/v2/email/outbound-bulk-emails")
.then()
.statusCode(200)
.body("BulkEmailEntryResults", hasSize(2))
.body("BulkEmailEntryResults[0].Status", equalTo("SUCCESS"))
.body("BulkEmailEntryResults[0].MessageId", notNullValue())
.body("BulkEmailEntryResults[1].Status", equalTo("SUCCESS"))
.body("BulkEmailEntryResults[1].MessageId", notNullValue())
.extract().path("BulkEmailEntryResults[0].MessageId");
String secondId = given()
.contentType("application/json")
.header("Authorization", AUTH_HEADER)
.body("""
{
"FromEmailAddress": "bulk2@example.com",
"DefaultContent": {
"Template": {
"TemplateName": "v2-bulk-welcome",
"TemplateData": "{\\"team\\":\\"floci\\"}"
}
},
"BulkEmailEntries": [
{
"Destination": {"ToAddresses": ["carol@example.com"]},
"ReplacementEmailContent": {
"ReplacementTemplate": {
"ReplacementTemplateData": "{\\"name\\":\\"Carol\\"}"
}
}
}
]
}
""")
.when()
.post("/v2/email/outbound-bulk-emails")
.then()
.statusCode(200)
.body("BulkEmailEntryResults", hasSize(1))
.body("BulkEmailEntryResults[0].Status", equalTo("SUCCESS"))
.extract().path("BulkEmailEntryResults[0].MessageId");
given()
.queryParam("id", firstId)
.when()
.get("/_aws/ses")
.then()
.statusCode(200)
.body("messages[0].Subject", equalTo("Hello Alice"))
.body("messages[0].Body.text_part", equalTo("Hi Alice, team floci!"));
given()
.queryParam("id", secondId)
.when()
.get("/_aws/ses")
.then()
.statusCode(200)
.body("messages[0].Subject", equalTo("Hello Carol"));
}
@Test
@Order(3)
void sendBulkEmail_inlineTemplateContent() {
String messageId = given()
.contentType("application/json")
.header("Authorization", AUTH_HEADER)
.body("""
{
"FromEmailAddress": "inline@example.com",
"DefaultContent": {
"Template": {
"TemplateContent": {
"Subject": "Inline {{name}}",
"Text": "Body for {{name}}"
},
"TemplateData": "{\\"name\\":\\"Default\\"}"
}
},
"BulkEmailEntries": [
{
"Destination": {"ToAddresses": ["dora@example.com"]},
"ReplacementEmailContent": {
"ReplacementTemplate": {
"ReplacementTemplateData": "{\\"name\\":\\"Dora\\"}"
}
}
}
]
}
""")
.when()
.post("/v2/email/outbound-bulk-emails")
.then()
.statusCode(200)
.body("BulkEmailEntryResults[0].Status", equalTo("SUCCESS"))
.extract().path("BulkEmailEntryResults[0].MessageId");
given()
.queryParam("id", messageId)
.when()
.get("/_aws/ses")
.then()
.statusCode(200)
.body("messages[0].Subject", equalTo("Inline Dora"))
.body("messages[0].Body.text_part", equalTo("Body for Dora"));
}
@Test
@Order(4)
void sendBulkEmail_unknownTemplate_returns404() {
given()
.contentType("application/json")
.header("Authorization", AUTH_HEADER)
.body("""
{
"FromEmailAddress": "bulk@example.com",
"DefaultContent": {
"Template": {"TemplateName": "ghost"}
},
"BulkEmailEntries": [
{"Destination": {"ToAddresses": ["alice@example.com"]}}
]
}
""")
.when()
.post("/v2/email/outbound-bulk-emails")
.then()
.statusCode(404)
.body("__type", equalTo("NotFoundException"));
}
@Test
@Order(5)
void sendBulkEmail_emptyEntries_returns400() {
given()
.contentType("application/json")
.header("Authorization", AUTH_HEADER)
.body("""
{
"FromEmailAddress": "bulk@example.com",
"DefaultContent": {
"Template": {"TemplateName": "v2-bulk-welcome"}
},
"BulkEmailEntries": []
}
""")
.when()
.post("/v2/email/outbound-bulk-emails")
.then()
.statusCode(400)
.body("__type", equalTo("BadRequestException"));
}
@Test
@Order(6)
void sendBulkEmail_missingTemplate_returns400() {
given()
.contentType("application/json")
.header("Authorization", AUTH_HEADER)
.body("""
{
"FromEmailAddress": "bulk@example.com",
"DefaultContent": {},
"BulkEmailEntries": [
{"Destination": {"ToAddresses": ["alice@example.com"]}}
]
}
""")
.when()
.post("/v2/email/outbound-bulk-emails")
.then()
.statusCode(400)
.body("__type", equalTo("BadRequestException"));
}
@Test
@Order(7)
void sendBulkEmail_entriesExceeds50_returnsMessageRejected() {
StringBuilder entries = new StringBuilder();
for (int i = 1; i <= 51; i++) {
if (i > 1) entries.append(",");
entries.append("{\"Destination\":{\"ToAddresses\":[\"user")
.append(i).append("@example.com\"]}}");
}
given()
.contentType("application/json")
.header("Authorization", AUTH_HEADER)
.body("""
{
"FromEmailAddress": "bulk@example.com",
"DefaultContent": {
"Template": {"TemplateName": "v2-bulk-welcome"}
},
"BulkEmailEntries": [%s]
}
""".formatted(entries))
.when()
.post("/v2/email/outbound-bulk-emails")
.then()
.statusCode(400)
.body("__type", equalTo("MessageRejected"));
}
@Test
@Order(8)
void sendBulkEmail_recipientsExceeds50_returnsMessageRejected() {
StringBuilder addrs = new StringBuilder();
for (int i = 1; i <= 51; i++) {
if (i > 1) addrs.append(",");
addrs.append("\"user").append(i).append("@example.com\"");
}
given()
.contentType("application/json")
.header("Authorization", AUTH_HEADER)
.body("""
{
"FromEmailAddress": "bulk@example.com",
"DefaultContent": {
"Template": {"TemplateName": "v2-bulk-welcome"}
},
"BulkEmailEntries": [
{"Destination": {"ToAddresses": [%s]}}
]
}
""".formatted(addrs))
.when()
.post("/v2/email/outbound-bulk-emails")
.then()
.statusCode(400)
.body("__type", equalTo("MessageRejected"));
}
}
@@ -0,0 +1,42 @@
package io.github.hectorvent.floci.services.ses;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertSame;
class SesServiceMergeTemplateDataTest {
private static final ObjectMapper MAPPER = new ObjectMapper();
@Test
void bothNull_returnsNull() {
assertNull(SesService.mergeTemplateData(null, null));
}
@Test
void emptyReplacement_returnsDefaultsWithoutCopy() {
JsonNode defaults = MAPPER.createObjectNode().put("team", "floci");
JsonNode replacement = MAPPER.createObjectNode();
assertSame(defaults, SesService.mergeTemplateData(defaults, replacement));
}
@Test
void emptyDefaults_returnsReplacementWithoutCopy() {
JsonNode defaults = MAPPER.createObjectNode();
JsonNode replacement = MAPPER.createObjectNode().put("name", "Alice");
assertSame(replacement, SesService.mergeTemplateData(defaults, replacement));
}
@Test
void bothNonEmpty_replacementOverridesDefaults() {
JsonNode defaults = MAPPER.createObjectNode().put("team", "floci").put("name", "default");
JsonNode replacement = MAPPER.createObjectNode().put("name", "Alice");
JsonNode merged = SesService.mergeTemplateData(defaults, replacement);
assertEquals("Alice", merged.path("name").asText());
assertEquals("floci", merged.path("team").asText());
}
}
@@ -0,0 +1,92 @@
package io.github.hectorvent.floci.services.ses;
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.containsString;
/**
* Verifies that v1 Query SES send actions reject requests when account-level
* sending is disabled, matching v2 REST JSON behavior and AWS semantics.
*/
@QuarkusTest
class SesV1AccountSendingPausedTest {
private static final String AUTH =
"AWS4-HMAC-SHA256 Credential=AKID/20260101/us-east-1/email/aws4_request";
@BeforeEach
void disableSending() {
given()
.contentType("application/json")
.body("{\"SendingEnabled\":false}")
.when()
.put("/v2/email/account/sending")
.then()
.statusCode(200);
}
@AfterEach
void restoreSending() {
given()
.contentType("application/json")
.body("{\"SendingEnabled\":true}")
.when()
.put("/v2/email/account/sending")
.then()
.statusCode(200);
}
@Test
void sendEmail_paused_returnsAccountSendingPausedException() {
given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendEmail")
.formParam("Source", "sender@example.com")
.formParam("Destination.ToAddresses.member.1", "recipient@example.com")
.formParam("Message.Subject.Data", "Subject")
.formParam("Message.Body.Text.Data", "Body")
.when()
.post("/")
.then()
.statusCode(400)
.body(containsString("<Code>AccountSendingPausedException</Code>"));
}
@Test
void sendRawEmail_paused_returnsAccountSendingPausedException() {
given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendRawEmail")
.formParam("Source", "sender@example.com")
.formParam("Destinations.member.1", "recipient@example.com")
.formParam("RawMessage.Data", "Subject: Hello\r\n\r\nBody")
.when()
.post("/")
.then()
.statusCode(400)
.body(containsString("<Code>AccountSendingPausedException</Code>"));
}
@Test
void sendTemplatedEmail_paused_returnsAccountSendingPausedException() {
given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", AUTH)
.formParam("Action", "SendTemplatedEmail")
.formParam("Source", "sender@example.com")
.formParam("Destination.ToAddresses.member.1", "recipient@example.com")
.formParam("Template", "any-template")
.formParam("TemplateData", "{}")
.when()
.post("/")
.then()
.statusCode(400)
.body(containsString("<Code>AccountSendingPausedException</Code>"));
}
}
@@ -0,0 +1,31 @@
package io.github.hectorvent.floci.services.ses.model;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class BulkEmailEntryResultTest {
@Test
void toV1String_invalidParameter_mapsToInvalidParameterValue() {
// SES v1 SendBulkTemplatedEmail per-destination Status uses
// "InvalidParameterValue", not "InvalidParameter".
assertEquals("InvalidParameterValue",
BulkEmailEntryResult.Status.INVALID_PARAMETER.toV1String());
}
@Test
void toV1String_standardEnumsUseCamelCase() {
assertEquals("Success", BulkEmailEntryResult.Status.SUCCESS.toV1String());
assertEquals("MessageRejected", BulkEmailEntryResult.Status.MESSAGE_REJECTED.toV1String());
assertEquals("MailFromDomainNotVerified",
BulkEmailEntryResult.Status.MAIL_FROM_DOMAIN_NOT_VERIFIED.toV1String());
assertEquals("ConfigurationSetDoesNotExist",
BulkEmailEntryResult.Status.CONFIGURATION_SET_DOES_NOT_EXIST.toV1String());
assertEquals("AccountDailyQuotaExceeded",
BulkEmailEntryResult.Status.ACCOUNT_DAILY_QUOTA_EXCEEDED.toV1String());
assertEquals("TransientFailure",
BulkEmailEntryResult.Status.TRANSIENT_FAILURE.toV1String());
assertEquals("Failed", BulkEmailEntryResult.Status.FAILED.toV1String());
}
}