One more test fix

This commit is contained in:
James Agnew 2018-12-04 19:55:14 -05:00
parent 29af6160d6
commit d150340d53
1 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ public class ResourceReindexingSvcImplTest extends BaseJpaTest {
when(myDaoRegistry.getResourceDao(eq(Patient.class))).thenReturn(myResourceDao); when(myDaoRegistry.getResourceDao(eq(Patient.class))).thenReturn(myResourceDao);
when(myDaoRegistry.getResourceDao(eq("Observation"))).thenReturn(myResourceDao); when(myDaoRegistry.getResourceDao(eq("Observation"))).thenReturn(myResourceDao);
when(myDaoRegistry.getResourceDao(eq(Observation.class))).thenReturn(myResourceDao); when(myDaoRegistry.getResourceDao(eq(Observation.class))).thenReturn(myResourceDao);
when(myResourceDao.read(any())).thenAnswer(t->{ when(myResourceDao.read(any(), any(), anyBoolean())).thenAnswer(t->{
IIdType id = (IIdType) t.getArguments()[0]; IIdType id = (IIdType) t.getArguments()[0];
return resources.get(id.getIdPartAsLong().intValue()); return resources.get(id.getIdPartAsLong().intValue());
}); });
@ -269,7 +269,7 @@ public class ResourceReindexingSvcImplTest extends BaseJpaTest {
when(myDaoRegistry.getResourceDao(eq(Patient.class))).thenReturn(myResourceDao); when(myDaoRegistry.getResourceDao(eq(Patient.class))).thenReturn(myResourceDao);
when(myDaoRegistry.getResourceDao(eq("Observation"))).thenReturn(myResourceDao); when(myDaoRegistry.getResourceDao(eq("Observation"))).thenReturn(myResourceDao);
when(myDaoRegistry.getResourceDao(eq(Observation.class))).thenReturn(myResourceDao); when(myDaoRegistry.getResourceDao(eq(Observation.class))).thenReturn(myResourceDao);
when(myResourceDao.read(any())).thenAnswer(t->{ when(myResourceDao.read(any(), any(), anyBoolean())).thenAnswer(t->{
IIdType id = (IIdType) t.getArguments()[0]; IIdType id = (IIdType) t.getArguments()[0];
return resources.get(id.getIdPartAsLong().intValue()); return resources.get(id.getIdPartAsLong().intValue());
}); });