@Test
public void testSetViewInfoNoOnlinePart() throws Exception {

  ViewInfo viewInfo = mock(ViewInfo.class);
  byte[] resourceData = "hello".getBytes();
  when(viewInfo.toCompressedJson()).thenReturn(resourceData);
  when(viewInfo.hasOnlinePartitions()).thenReturn(false);
  zkManager.setViewInfo(viewInfo);
  verify(zk, times(0)).create(anyString(), any(byte[].class),
      anyListOf(ACL.class), any(CreateMode.class));
  verify(zk, times(0)).setData(anyString(), any(byte[].class), anyInt());
}