@Test public void testGetSetSharedObjects() throws Exception { SharedObjects sharedObjects = mock( SharedObjects.class ); meta.setSharedObjects( sharedObjects ); assertEquals( sharedObjects, meta.getSharedObjects() ); meta.setSharedObjects( null ); AbstractMeta spyMeta = spy( meta ); doThrow( KettleException.class ).when( spyMeta ).environmentSubstitute( anyString() ); assertNull( spyMeta.getSharedObjects() ); }