@Test public void testGetSize() throws RepositoryException { mockStatic(ServiceHelpers.class); // obviously not a real value when(getObjectSize(mockObjNode)).thenReturn(-8L); final long actual = testFedoraObject.getSize(); assertEquals(-8, actual); }
@Test public void testGetLastModified() throws RepositoryException { when(mockObjNode.hasProperty(JCR_LASTMODIFIED)).thenReturn(true); when(mockObjNode.getProperty(JCR_LASTMODIFIED)).thenReturn(mockProp); when(mockProp.getDate()).thenReturn(Calendar.getInstance()); testFedoraObject.getLastModifiedDate(); verify(mockObjNode).getProperty(JCR_LASTMODIFIED); }
@Test public void testGetModels() throws RepositoryException { final Collection<String> actual = testFedoraObject.getModels(); assertNotNull(actual); }
@Test public void testGetNode() { assertEquals(testFedoraObject.getNode(), mockObjNode); }
@Test public void testGetName() throws RepositoryException { assertEquals(testFedoraObject.getName(), testPid); }