Map<Pair<Tenor, Tenor>, Double> values = Maps.newHashMap();
for (int i = 0; i < xs.length; i++) {
values.put(Pair.of(xs[i], ys[i]), vols[i]);
}
String name = "test";
UniqueIdentifiable target = Currency.USD;
VolatilitySurfaceData<Tenor, Tenor> data = new VolatilitySurfaceData<>(name, name, target, xs, ys, values);
Map<String, Object> map =
(Map<String, Object>) new VolatilitySurfaceDataFormatter().format(data, null, TypeFormatter.Format.EXPANDED, null);
assertEquals(Lists.newArrayList("1D", "7D", "14D", "1M"), map.get(SurfaceFormatterUtils.X_LABELS));