void () { final StringBuilder out = new StringBuilder(); XBreakpointListener<XLineBreakpoint<MyBreakpointProperties>> listener = new XBreakpointListener<>() { @Override public void breakpointAdded(@NotNull final XLineBreakpoint<MyBreakpointProperties> breakpoint) { out.append("added[").append(breakpoint.getProperties().myOption).append("];"); } @Override public void breakpointRemoved(@NotNull final XLineBreakpoint<MyBreakpointProperties> breakpoint) { out.append("removed[").append(breakpoint.getProperties().myOption).append("];"); } @Override public void breakpointChanged(@NotNull final XLineBreakpoint<MyBreakpointProperties> breakpoint) { out.append("changed[").append(breakpoint.getProperties().myOption).append("];"); } }; myBreakpointManager.addBreakpointListener(MY_LINE_BREAKPOINT_TYPE, listener); XBreakpoint<MyBreakpointProperties> breakpoint = addLineBreakpoint(myBreakpointManager, "url", 239, new MyBreakpointProperties("abc")); addBreakpoint(myBreakpointManager, new MyBreakpointProperties("321")); removeBreakPoint(myBreakpointManager, breakpoint); assertEquals("added[abc];removed[abc];", out.toString()); myBreakpointManager.removeBreakpointListener(MY_LINE_BREAKPOINT_TYPE, listener); out.setLength(0); addLineBreakpoint(myBreakpointManager, "url", 239, new MyBreakpointProperties("a")); assertEquals("", out.toString()); }