RobotState { public List<Point2D.Double> botCorners() { if (_botCorners == null) { _botCorners = new ArrayList<Point2D.Double>(); _botCorners.add(new Point2D.Double(location.x - BOT_HALF_WIDTH, location.y - BOT_HALF_WIDTH)); _botCorners.add(new Point2D.Double(location.x - BOT_HALF_WIDTH, location.y + BOT_HALF_WIDTH)); _botCorners.add(new Point2D.Double(location.x + BOT_HALF_WIDTH, location.y - BOT_HALF_WIDTH)); _botCorners.add(new Point2D.Double(location.x + BOT_HALF_WIDTH, location.y + BOT_HALF_WIDTH)); } return _botCorners; } private  RobotState(Point2D.Double location, double heading, double velocity,
      long time, boolean interpolated); List<Point2D.Double> botCorners(); Rectangle2D.Double botRectangle(); List<Line2D.Double> botSides(); static Builder newBuilder(); final Point2D.Double location; final double heading; final double velocity; final long time; final boolean interpolated; }
@Test public void testBotCorners() { Point2D.Double botLocation = newLocation(312, 939); RobotState state = RobotState.newBuilder() .setLocation(botLocation) .build(); List<Point2D.Double> botCorners = state.botCorners(); assertTrue(listContainsPoint(botCorners, newLocation(330, 957))); assertTrue(listContainsPoint(botCorners, newLocation(330, 921))); assertTrue(listContainsPoint(botCorners, newLocation(294, 921))); assertTrue(listContainsPoint(botCorners, newLocation(294, 957))); assertEquals(botCorners, state.botCorners()); }