@Test public void testReadRep() throws Exception { final Repository rep = mock(Repository.class); final IMetaStore metaStore = mock(IMetaStore.class); final ObjectId id_step = mock(ObjectId.class); final List databases = mock(List.class); doReturn(1).when(rep).countNrStepAttributes(eq(id_step), anyString()); setSessionVariableMetaSpy.readRep(rep, metaStore, id_step, databases); verify(rep, times(3)).getStepAttributeString(eq(id_step), anyInt(), anyString()); verify(rep).getStepAttributeBoolean(eq(id_step), anyInt(), anyString(), anyBoolean()); verify(setSessionVariableMetaSpy).allocate(anyInt()); }