@Test public void testInvalidResourceType() throws MarshalException, ValidationException, IOException { String modifiedXml = m_xml.replaceFirst("ifIndex", "brocadeIndex"); ThrowableAnticipator ta = new ThrowableAnticipator(); ta.anticipate(new IllegalArgumentException("instance 'brocadeIndex' invalid in mibObj definition for OID '.1.3.6.1.2.1.2.2.1.10' in collection 'default' for group 'mib2-interfaces'. Allowable instance values: any positive number, 'ifIndex', or any of the configured resourceTypes: (none)")); try { initDataCollectionFactory(modifiedXml); assertArrayEquals(new String[0], DataCollectionConfigFactory.getInstance().getConfiguredResourceTypes().keySet().toArray(new String[0])); DataCollectionConfigFactory.getInstance().getConfiguredResourceTypes(); } catch (Throwable t) { ta.throwableReceived(t); } ta.verifyAnticipated(); }
public static synchronized DataCollectionConfigDao getInstance() { if (m_singleton == null) throw new IllegalStateException("The factory has not been initialized"); return m_singleton; }
DataCollectionConfigFactory { public static synchronized DataCollectionConfigDao getInstance() { if (m_singleton == null) throw new IllegalStateException("The factory has not been initialized"); return m_singleton; } }
DataCollectionConfigFactory { public static synchronized DataCollectionConfigDao getInstance() { if (m_singleton == null) throw new IllegalStateException("The factory has not been initialized"); return m_singleton; }  }
DataCollectionConfigFactory { public static synchronized DataCollectionConfigDao getInstance() { if (m_singleton == null) throw new IllegalStateException("The factory has not been initialized"); return m_singleton; }  static void setInstance(DataCollectionConfigDao instance); static synchronized void init(); static synchronized void reload(); static synchronized DataCollectionConfigDao getInstance(); static void main(String[] args); }
DataCollectionConfigFactory { public static synchronized DataCollectionConfigDao getInstance() { if (m_singleton == null) throw new IllegalStateException("The factory has not been initialized"); return m_singleton; }  static void setInstance(DataCollectionConfigDao instance); static synchronized void init(); static synchronized void reload(); static synchronized DataCollectionConfigDao getInstance(); static void main(String[] args);  }