@Test public void shouldBuildMappingForOperation() throws Exception { Mapping mapping = build(); assertEquals("some", mapping.getMappingForField("some").getAttributeName()); assertEquals("operation", mapping.getMethodForOperation("operation")); assertEquals("operation", mapping.getOperationForMethod("operation")); }
public Mapping build() { Mapping result = mapping; if (fieldMap != null) result = new MapFieldsMapping(result, fieldMap); if (opMap != null) result = new MapOperationsMapping(result, opMap); return new CheckedMapping(result); }
MappingBuilder { public Mapping build() { Mapping result = mapping; if (fieldMap != null) result = new MapFieldsMapping(result, fieldMap); if (opMap != null) result = new MapOperationsMapping(result, opMap); return new CheckedMapping(result); } }
MappingBuilder { public Mapping build() { Mapping result = mapping; if (fieldMap != null) result = new MapFieldsMapping(result, fieldMap); if (opMap != null) result = new MapOperationsMapping(result, opMap); return new CheckedMapping(result); } MappingBuilder(String operationName);  MappingBuilder(Class<?> api); }
MappingBuilder { public Mapping build() { Mapping result = mapping; if (fieldMap != null) result = new MapFieldsMapping(result, fieldMap); if (opMap != null) result = new MapOperationsMapping(result, opMap); return new CheckedMapping(result); } MappingBuilder(String operationName);  MappingBuilder(Class<?> api); MappingBuilder upperCaseFields(); MappingBuilder mapField(String property, String attributeName); MappingBuilder mapField(String property, FieldMapping<?> attribute); MappingBuilder mapOperation(String method, String operation); Mapping build(); }
MappingBuilder { public Mapping build() { Mapping result = mapping; if (fieldMap != null) result = new MapFieldsMapping(result, fieldMap); if (opMap != null) result = new MapOperationsMapping(result, opMap); return new CheckedMapping(result); } MappingBuilder(String operationName);  MappingBuilder(Class<?> api); MappingBuilder upperCaseFields(); MappingBuilder mapField(String property, String attributeName); MappingBuilder mapField(String property, FieldMapping<?> attribute); MappingBuilder mapOperation(String method, String operation); Mapping build(); static final Mapping DEFAULT; }