    @Test
    public void testGetByteContentWithoutStream() throws Exception {

        ResourceImpl resource = mock(ResourceImpl.class);
        String contentString = "Testing Content";
        when(resource.getContent()).thenReturn(contentString);
        when(resource.getContentStream()).thenReturn(null);
        byte[] byteContent = IndexingUtils.getByteContent(resource, null);
        assertEquals(contentString, RegistryUtils.decodeBytes(byteContent));
    }