### Question:
CardHolder implements Cloneable, Serializable, Loggeable { public String getNameOnCard() { String name = null; if (track1!=null) { StringTokenizer st = new StringTokenizer(track1, TRACK1_SEPARATOR); if (st.countTokens()<2) return null; st.nextToken(); name = st.nextToken(); } return name; } CardHolder();  CardHolder(String track2);  CardHolder(String pan, String exp);  CardHolder(ISOMsg m); void parseTrack2(String s); void setTrack1(String track1); String getTrack1(); boolean hasTrack1(); String getNameOnCard(); String getTrack2(); boolean hasTrack2(); void setSecurityCode(String securityCode); String getSecurityCode(); boolean hasSecurityCode(); @SuppressWarnings("unused") String getTrailler(); @SuppressWarnings("unused") void setTrailler(String trailer); String getTrailer(); void setTrailer(String trailer); void setPAN(String pan); String getPAN(); String getBIN(); void setEXP(String exp); String getEXP(); boolean isExpired(); boolean isExpired(Date currentDate); boolean isValidCRC(); static boolean isValidCRC(String p); void dump(PrintStream p, String indent); String getServiceCode(); boolean seemsManualEntry(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testGetNameOnCard() throws Throwable { CardHolder cardHolder = new CardHolder(); cardHolder.setTrack1(" `^o;t~Dfv._uUa7agT,\tQ2lt @0@5BT0O)a"); String result = cardHolder.getNameOnCard(); assertEquals("o;t~Dfv._uUa7agT,\tQ2lt @0@5BT0O)a", result, "result"); }
@Test public void testGetNameOnCard2() throws Throwable { String result = new CardHolder().getNameOnCard(); assertNull(result, "result"); }