// Path: src/main/java/com/yahoo/memory4/ResourceHandler.java
// enum ResourceType { MEMORY_MAPPED_FILE, NATIVE_MEMORY }


import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import java.io.File;
import org.testng.annotations.Test;
import com.yahoo.memory4.ResourceHandler.ResourceType;
/*
 * Copyright 2017, Yahoo! Inc. Licensed under the terms of the
 * Apache License 2.0. See LICENSE file at the project root for terms.
 */

package com.yahoo.memory4;





public class AllocateDirectMapTest {

  @Test
  public void simpleMap() throws Exception {
    File file = new File(getClass().getClassLoader().getResource("GettysburgAddress.txt").getFile());
    try (ResourceHandler rh = Memory.map(file)) {
// Path: src/main/java/com/yahoo/memory4/ResourceHandler.java
// enum ResourceType { MEMORY_MAPPED_FILE, NATIVE_MEMORY }


// Path: src/test/java/com/yahoo/memory4/AllocateDirectMapTest.java
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import java.io.File;
import org.testng.annotations.Test;
import com.yahoo.memory4.ResourceHandler.ResourceType;

/*
 * Copyright 2017, Yahoo! Inc. Licensed under the terms of the
 * Apache License 2.0. See LICENSE file at the project root for terms.
 */

package com.yahoo.memory4;





public class AllocateDirectMapTest {

  @Test
  public void simpleMap() throws Exception {
    File file = new File(getClass().getClassLoader().getResource("GettysburgAddress.txt").getFile());
    try (ResourceHandler rh = Memory.map(file)) {
      ResourceType type = rh.getResourceType();