### Question:
UserId { @SuppressWarnings("deprecation") public final String toString() { return this.toString; } UserId(String userName);  UserId(String userName, int registerDate);  UserId(String userName, int registerDate, byte[] internal); byte[] getInternal(); String getUserName(); int getRegisterDate(); @SuppressWarnings("deprecation") final String toString(); final String convertToString(); @Override int hashCode(); @Override boolean equals(Object obj); final static UserId valueOf(String userIdString); final static UserId fromString(String userIdString); final static UserId fromBytes(byte[] bytes);  }### Answer:
@Test public void testToString() { Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, 2011); cal.set(Calendar.MONTH, 0); cal.set(Calendar.DAY_OF_MONTH, 1); cal.set(Calendar.HOUR, 01); cal.set(Calendar.MINUTE, 15); cal.set(Calendar.SECOND, 30); int dateValue = (int)(cal.getTimeInMillis()/1000); UserId userId = new UserId("0123456789", dateValue); assertEquals(dateValue+":0123456789", userId.toString()); cal.set(Calendar.MONTH, 10); cal.set(Calendar.DAY_OF_MONTH, 10); dateValue = (int)(cal.getTimeInMillis()/1000); userId = new UserId("0123456789", dateValue); assertEquals(dateValue+":0123456789", userId.toString()); }
@Test public void testToString2() { Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, 2012); cal.set(Calendar.MONTH, 1); cal.set(Calendar.DAY_OF_MONTH, 29); cal.set(Calendar.HOUR, 01); cal.set(Calendar.MINUTE, 15); cal.set(Calendar.SECOND, 30); System.out.println(sdf.format(cal.getTime())); int dateValue = (int)(cal.getTimeInMillis()/1000); UserId userId = new UserId("0123456789", dateValue); assertEquals(dateValue+":0123456789", userId.toString()); cal.set(Calendar.YEAR, 2011); cal.set(Calendar.MONTH, 1); cal.set(Calendar.DAY_OF_MONTH, 29); dateValue = (int)(cal.getTimeInMillis()/1000); userId = new UserId("0123456789", dateValue); }