mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/persistence/TestObservationStoreImpl.java
@Test
    public final void testNoPropertiesSet() throws IOException, SQLException
    {
        // mock
        Connection sqlConn = mock(java.sql.Connection.class, withSettings().extraInterfaces(JDOConnection.class));
        when(m_PersistenceManager.getDataStoreConnection()).thenReturn((JDOConnection)sqlConn);
        
        Statement statement = mock(Statement.class);
        when(sqlConn.createStatement()).thenReturn(statement);
        
        Map<String, Object> props = new HashMap<String, Object>();

        m_SUT.activate(Collections.unmodifiableMap(props), m_Context);
        
        // SET CACHE_SIZE should not be called at all as default will be used
        verify(statement, never()).execute(anyString());
    }
/**
     * Test that if component and framework properties are not set, the default is used which means SQL statement is not
     * executed.
     */
Test that if component and framework properties are not set, the default is used which means SQL statement is not
executed.
Test that if component and framework properties are not set the default is used which means SQL statement is not executed .
@Test
    public final void testNoPropertiesSet() throws IOException, SQLException
    {
        Connection sqlConn = mock(java.sql.Connection.class, withSettings().extraInterfaces(JDOConnection.class));
        when(m_PersistenceManager.getDataStoreConnection()).thenReturn((JDOConnection)sqlConn);
        Statement statement = mock(Statement.class);
        when(sqlConn.createStatement()).thenReturn(statement);
        Map<String, Object> props = new HashMap<String, Object>();
        m_SUT.activate(Collections.unmodifiableMap(props), m_Context);
        verify(statement, never()).execute(anyString());
    }
@ Test public final void testNoPropertiesSet ( ) throws IOException , SQLException { Connection sqlConn = mock ( java . sql . Connection . class , withSettings ( ) . extraInterfaces ( JDOConnection . class ) ) ; when ( m_PersistenceManager . getDataStoreConnection ( ) ) . thenReturn ( ( JDOConnection ) sqlConn ) ; Statement statement = mock ( Statement . class ) ; when ( sqlConn . createStatement ( ) ) . thenReturn ( statement ) ; Map < String , Object > props = new HashMap < String , Object > ( ) ; m_SUT . activate ( Collections . unmodifiableMap ( props ) , m_Context ) ; verify ( statement , never ( ) ) . execute ( anyString ( ) ) ; }
Test that if component and framework properties are not set, the default is used which means SQL statement is not
 executed.
Test that if component and framework properties are not set the default is used which means SQL statement is not executed .
// mock // SET CACHE_SIZE should not be called at all as default will be used