Reuse Function identity

This commit is contained in:
Gary Gregory 2022-05-30 09:30:28 -04:00
parent 47f699be39
commit 16ed9eb220
1 changed files with 2 additions and 2 deletions

View File

@ -33,6 +33,7 @@ import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.function.Function;
import org.easymock.EasyMock;
import org.junit.jupiter.api.Test;
@ -136,8 +137,7 @@ public class EventListenerSupportTest {
@Test
public void testSerialization() throws IOException, ClassNotFoundException, PropertyVetoException {
final EventListenerSupport<VetoableChangeListener> listenerSupport = EventListenerSupport.create(VetoableChangeListener.class);
listenerSupport.addListener(e -> {
});
listenerSupport.addListener(Function.identity()::apply);
listenerSupport.addListener(EasyMock.createNiceMock(VetoableChangeListener.class));
//serialize: