@Test public void formatPoint() { Point<String, Integer> point = new Point<>("AAA", 123); when(pointValueFormatterManager.format("AAA")).thenReturn("AAA"); when(pointValueFormatterManager.format(123)).thenReturn("123"); String[] formattedPoint = pointFormatter.formatPoint(point); assertNotNull(formattedPoint); assertEquals(2, formattedPoint.length); assertEquals("AAA", formattedPoint[0]); assertEquals("123", formattedPoint[1]); }
public String[] formatPoint(Point<?, ?> point) { String x = pointValueFormatterManager.format(point.getX()); String y = pointValueFormatterManager.format(point.getY()); return new String[]{x, y}; }
PointFormatter { public String[] formatPoint(Point<?, ?> point) { String x = pointValueFormatterManager.format(point.getX()); String y = pointValueFormatterManager.format(point.getY()); return new String[]{x, y}; } }
PointFormatter { public String[] formatPoint(Point<?, ?> point) { String x = pointValueFormatterManager.format(point.getX()); String y = pointValueFormatterManager.format(point.getY()); return new String[]{x, y}; }  }
PointFormatter { public String[] formatPoint(Point<?, ?> point) { String x = pointValueFormatterManager.format(point.getX()); String y = pointValueFormatterManager.format(point.getY()); return new String[]{x, y}; }  String[] formatPoint(Point<?, ?> point); void setPointValueFormatterManager(PointValueFormatterManager pointValueFormatterManager); }
PointFormatter { public String[] formatPoint(Point<?, ?> point) { String x = pointValueFormatterManager.format(point.getX()); String y = pointValueFormatterManager.format(point.getY()); return new String[]{x, y}; }  String[] formatPoint(Point<?, ?> point); void setPointValueFormatterManager(PointValueFormatterManager pointValueFormatterManager);  }