예제 #1
0
  @Test
  public void shouldCreatePathWithData() throws Exception {
    // Given
    createCommand.data = "node data";

    // When
    createCommand.doExecute(curator);

    // Then
    verify(createBuilder).forPath(createCommand.path, createCommand.data.getBytes());
  }
예제 #2
0
  @Test
  public void shouldCreateRecursivePathWithData() throws Exception {
    // Given
    createCommand.recursive = true;
    createCommand.data = "node data";

    // When
    createCommand.doExecute(curator);

    // Then
    verify(createBuilder).creatingParentsIfNeeded();
    verify(createBuilder).forPath(createCommand.path, createCommand.data.getBytes());
  }