### Question:
Card implements Jsonable { @Nullable public String getFormattedExpiryDate(String pattern) { if (expiryDate == null || pattern == null) { return null; } SimpleDateFormat inputFormat = new SimpleDateFormat("yyMM", Locale.getDefault()); SimpleDateFormat outputFormat = new SimpleDateFormat(pattern, Locale.getDefault()); try { return outputFormat.format(inputFormat.parse(expiryDate)); } catch (ParseException e) { return null; } } Card();   Card(String maskedPan, String cardholderName, String expiryDate, Token token, AdditionalData additionalData); static Card getEmptyCard(); @Nullable String getMaskedPan(); @Nullable String getCardholderName(); @Nullable String getExpiryDate(); @Nullable String getFormattedExpiryDate(String pattern); @Nullable Token getCardToken(); @NonNull AdditionalData getAdditionalData(); boolean isEmpty(); @Override String toJson(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void shouldFormatExpiryDateCorrectly() throws Exception { Card card = new Card("123456789XXXXXX", "Mr T", "2010", null, null); assertThat(card.getFormattedExpiryDate("MM/yyyy")).isEqualTo("10/2020"); }