### Question:
CallbackDescriptor implements Serializable { public void addCallbackMethod(String methodName) { callbackMethods.add(methodName); } CallbackDescriptor(LifecycleEvent callbackType); void clear(); Collection<String> getCallbackMethods(); void addCallbackMethod(String methodName); void removeCallbackMethod(String methodName); LifecycleEvent getCallbackType(); boolean moveMethod(String callbackMethod, int destinationIndex); void setCallbackMethodAt(int index, String method);  }### Answer:
@Test public void testAddCallbackMethod() { CallbackDescriptor m = new CallbackDescriptor(LifecycleEvent.POST_ADD); assertEquals(0, m.getCallbackMethods().size()); m.addCallbackMethod("a"); assertEquals(1, m.getCallbackMethods().size()); m.addCallbackMethod("b"); assertEquals(2, m.getCallbackMethods().size()); m.addCallbackMethod("a"); assertEquals(2, m.getCallbackMethods().size()); }