### Question:
StatusBuilder extends UpdateBuilder { public String buildCondensed() { String status = ""; if(validNotificationsResponse() && validInboxResponse()) { status = String.valueOf(notificationResponse.count + inboxResponse.count); } else if(validNotificationsResponse()) { status = String.valueOf(notificationResponse.count); } else if(validInboxResponse()) { status = String.valueOf(inboxResponse.count); } return status; } StatusBuilder(NotificationsResponse notificationsResponse, InboxResponse inboxResponse); String buildCondensed(); String build();  }### Answer:
@Test public void should_build_blank() { String status = ""; StatusBuilder statusBuilder = new StatusBuilder(createInvalidNotificationResponse(), createInvalidInboxResponse()); assertEquals(status, statusBuilder.buildCondensed()); statusBuilder = new StatusBuilder(null, createInvalidInboxResponse()); assertEquals(status, statusBuilder.buildCondensed()); statusBuilder = new StatusBuilder(createInvalidNotificationResponse(), null); assertEquals(status, statusBuilder.buildCondensed()); statusBuilder = new StatusBuilder(null, null); assertEquals(status, statusBuilder.buildCondensed()); }
@Test public void should_build_5() { String status = "5"; StatusBuilder statusBuilder = new StatusBuilder(createNotificationResponse(0), createInboxResponse(5)); assertEquals(statusBuilder.buildCondensed(), status); statusBuilder = new StatusBuilder(createNotificationResponse(5), createInboxResponse(0)); assertEquals(status, statusBuilder.buildCondensed()); statusBuilder = new StatusBuilder(createNotificationResponse(2), createInboxResponse(3)); assertEquals(status, statusBuilder.buildCondensed()); statusBuilder = new StatusBuilder(createNotificationResponse(5), null); assertEquals(status, statusBuilder.buildCondensed()); statusBuilder = new StatusBuilder(null, createInboxResponse(5)); assertEquals(status, statusBuilder.buildCondensed()); statusBuilder = new StatusBuilder(createNotificationResponse(5), createInvalidInboxResponse()); assertEquals(status, statusBuilder.buildCondensed()); statusBuilder = new StatusBuilder(createInvalidNotificationResponse(), createInboxResponse(5)); assertEquals(status, statusBuilder.buildCondensed()); }