### Question:
DNDListDOMHelper { static int getCSSWidth(final HTMLElement element) { final String width = element.style.getPropertyValue("width"); return parseInt(width.replace("calc(100% - ", "").replace("px)", "")); }   static final String DRAGGING; }### Answer:
@Test public void testGetCSSWidth() { element.style = mock(CSSStyleDeclaration.class); when(element.style.getPropertyValue("width")).thenReturn("calc(100% - 321px)"); final int actualWidth = getCSSWidth(element); final int expectedWidth = 321; assertEquals(expectedWidth, actualWidth); }