}
@Test
public void closesCloseableElementsBesidesOfExceptions() throws Exception
{
Closeable closeable1 = mock(Closeable.class);
doThrow(new DefaultMuleException("Error")).when(closeable1).close();
closeableMap.put(NEW_KEY_1, closeable1);
Closeable closeable2 = mock(Closeable.class);
closeableMap.put(NEW_KEY_2, closeable2);
closeableMap.close();
verify(closeable1).close();