@Test public void notifiesObserversOnIdChange() { PropertyChangeListener mockListener = mock(PropertyChangeListener.class); connectable.addPropertyChangeListener(mockListener); connectable.setId(""); verify(mockListener).propertyChange(any(PropertyChangeEvent.class)); }
@Test public void defaultNameOffsetValues() { assertEquals(-5, connectable.getNameXOffset(), DOUBLE_DELTA); assertEquals(35, connectable.getNameYOffset(), DOUBLE_DELTA); }