// Path: src/test/java/net/gcdc/geonetworking/AreaTest.java
// static byte[] areaParamToBytes(Position center, int distanceA, int distanceB, int degrees) {
//   int latBytes = (int) (center.lattitudeDegrees() * TENTH_MICRODEGREE_MULTIPLIER);
//   int lonBytes = (int) (center.longitudeDegrees() * TENTH_MICRODEGREE_MULTIPLIER);
// 
//   ByteBuffer expectedBuffer = getAreaByteBuffer();
//   expectedBuffer.putInt(latBytes);
//   expectedBuffer.putInt(lonBytes);
//   expectedBuffer.putShort((short) distanceA);
//   expectedBuffer.putShort((short) distanceB);
//   expectedBuffer.putShort((short) degrees);
//   return expectedBuffer.array();
// }
// 
// Path: src/test/java/net/gcdc/geonetworking/AreaTest.java
// static void asBinaryString(byte[] bytes) {
//   for (byte b : bytes) {
//     System.out.println(Integer.toBinaryString(b & 255 | 256).substring(1));
//   }
// }
// 
// Path: src/test/java/net/gcdc/geonetworking/AreaTest.java
// static ByteBuffer getAreaByteBuffer() {
//   return ByteBuffer.allocate(14);
// }


import static net.gcdc.geonetworking.AreaTest.Support.areaParamToBytes;
import static net.gcdc.geonetworking.AreaTest.Support.asBinaryString;
import static net.gcdc.geonetworking.AreaTest.Support.getAreaByteBuffer;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.nio.ByteBuffer;
import nl.jqno.equalsverifier.EqualsVerifier;
import org.junit.Test;
    int degrees = 45;
    verifyArea(center, distance, distance, degrees);
  }

  private void testAreaPosition(int lat, int lon) {
    Position center = new Position(lat, lon);
    int distanceA = 100;
    int distanceB = 300;
    int degrees = 45;
    verifyArea(center, distanceA, distanceB, degrees);
  }

  private void verifyArea(Position center, int distanceA, int distanceB, int degrees) {
    Area rect = Area.rectangle(center, distanceA, distanceB, degrees);
    verifyAreaRectangleBytes(rect, center, distanceA, distanceB, degrees);
    verifyAreaRectangleReturnTypes(rect, center);
    verifyAreaRectangleString(rect, center, distanceA, distanceB, degrees);
  }

  private void verifyAreaRectangleReturnTypes(Area rect, Position center) {
    assertEquals(Area.Type.RECTANGLE, rect.type());
    assertEquals(center, rect.center());
  }

  private void verifyAreaRectangleBytes(Area rectangle, Position center, int distanceA,
                                        int distanceB, int degrees) {
    ByteBuffer actualByteBuffer = getAreaByteBuffer();
    rectangle.putTo(actualByteBuffer);

    byte[] actual = actualByteBuffer.array();
// Path: src/test/java/net/gcdc/geonetworking/AreaTest.java
// static byte[] areaParamToBytes(Position center, int distanceA, int distanceB, int degrees) {
//   int latBytes = (int) (center.lattitudeDegrees() * TENTH_MICRODEGREE_MULTIPLIER);
//   int lonBytes = (int) (center.longitudeDegrees() * TENTH_MICRODEGREE_MULTIPLIER);
// 
//   ByteBuffer expectedBuffer = getAreaByteBuffer();
//   expectedBuffer.putInt(latBytes);
//   expectedBuffer.putInt(lonBytes);
//   expectedBuffer.putShort((short) distanceA);
//   expectedBuffer.putShort((short) distanceB);
//   expectedBuffer.putShort((short) degrees);
//   return expectedBuffer.array();
// }
// 
// Path: src/test/java/net/gcdc/geonetworking/AreaTest.java
// static void asBinaryString(byte[] bytes) {
//   for (byte b : bytes) {
//     System.out.println(Integer.toBinaryString(b & 255 | 256).substring(1));
//   }
// }
// 
// Path: src/test/java/net/gcdc/geonetworking/AreaTest.java
// static ByteBuffer getAreaByteBuffer() {
//   return ByteBuffer.allocate(14);
// }


// Path: src/test/java/net/gcdc/geonetworking/AreaTest.java
import static net.gcdc.geonetworking.AreaTest.Support.areaParamToBytes;
import static net.gcdc.geonetworking.AreaTest.Support.asBinaryString;
import static net.gcdc.geonetworking.AreaTest.Support.getAreaByteBuffer;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.nio.ByteBuffer;
import nl.jqno.equalsverifier.EqualsVerifier;
import org.junit.Test;

    int degrees = 45;
    verifyArea(center, distance, distance, degrees);
  }

  private void testAreaPosition(int lat, int lon) {
    Position center = new Position(lat, lon);
    int distanceA = 100;
    int distanceB = 300;
    int degrees = 45;
    verifyArea(center, distanceA, distanceB, degrees);
  }

  private void verifyArea(Position center, int distanceA, int distanceB, int degrees) {
    Area rect = Area.rectangle(center, distanceA, distanceB, degrees);
    verifyAreaRectangleBytes(rect, center, distanceA, distanceB, degrees);
    verifyAreaRectangleReturnTypes(rect, center);
    verifyAreaRectangleString(rect, center, distanceA, distanceB, degrees);
  }

  private void verifyAreaRectangleReturnTypes(Area rect, Position center) {
    assertEquals(Area.Type.RECTANGLE, rect.type());
    assertEquals(center, rect.center());
  }

  private void verifyAreaRectangleBytes(Area rectangle, Position center, int distanceA,
                                        int distanceB, int degrees) {
    ByteBuffer actualByteBuffer = getAreaByteBuffer();
    rectangle.putTo(actualByteBuffer);

    byte[] actual = actualByteBuffer.array();
    byte[] expected = areaParamToBytes(center, distanceA, distanceB, degrees);