/* c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil
 * vi: set shiftwidth=2 tabstop=2 expandtab:
 * :indentSize=2:tabSize=2:noTabs=true:
 */

import org.junit.*;

import common.Utils;

import javax.rmi.CORBA.Util;
import java.util.Objects;

public class TestHash {
  @Test
  public void
  test1 () {
    System.out.println(Utils.hash_func("Hello World"));
  }

  @Test
  public void
  test2 () {
    String s0 = Utils.hash_func("Hello World");
    String s1 = Utils.hash_func("hello World");
    assert (! Objects.equals (s0, s1));
    System.out.println ("Hello World: " + s0);
    System.out.println ("hello World: " + s1);
  }

  @Test public void
  test3 () {
    String s0 = new String ("Hello World!");
    String s1 = "Hello World!";

    String h0 = Utils.hash_func (s0);
    String h1 = Utils.hash_func (s1);

    assert (Objects.equals (h0, h1));
  }

}
