brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [1/9] incubator-brooklyn git commit: Fix indents in rest-api
Date Thu, 15 Jan 2015 14:59:55 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 05f087f81 -> f72d9aa7c


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f7aa7627/usage/rest-api/src/main/java/brooklyn/rest/domain/TaskSummary.java
----------------------------------------------------------------------
diff --git a/usage/rest-api/src/main/java/brooklyn/rest/domain/TaskSummary.java b/usage/rest-api/src/main/java/brooklyn/rest/domain/TaskSummary.java
index 5fa0765..b83140a 100644
--- a/usage/rest-api/src/main/java/brooklyn/rest/domain/TaskSummary.java
+++ b/usage/rest-api/src/main/java/brooklyn/rest/domain/TaskSummary.java
@@ -37,194 +37,193 @@ import com.google.common.collect.ImmutableMap;
 
 public class TaskSummary implements HasId {
 
-  private final String id;
-  private final String displayName;
-  private final String entityId;
-  private final String entityDisplayName;
-  private final String description;
-  private final Collection<Object> tags;
-  
-  private final Long submitTimeUtc;
-  private final Long startTimeUtc;
-  private final Long endTimeUtc;
-  
-  private final String currentStatus;
-  private final Object result;
-  private final boolean isError;
-  private final boolean isCancelled; 
-
-  private final List<LinkWithMetadata> children;
-  private final LinkWithMetadata submittedByTask;
-  
-  @JsonSerialize(include=Inclusion.NON_NULL)
-  private final LinkWithMetadata blockingTask;
-  @JsonSerialize(include=Inclusion.NON_NULL)
-  private final String blockingDetails;
-  
-  private final String detailedStatus;
-  
-  @JsonSerialize(include=Inclusion.NON_NULL)
-  private final Map<String, LinkWithMetadata> streams;
-  
-  private final Map<String, URI> links;
-  
-  public TaskSummary(
-          @JsonProperty("id") String id, 
-          @JsonProperty("displayName") String displayName, 
-          @JsonProperty("description") String description, 
-          @JsonProperty("entityId") String entityId, 
-          @JsonProperty("entityDisplayName") String entityDisplayName, 
-          @JsonProperty("tags") Set<Object> tags,
-          @JsonProperty("submitTimeUtc") Long submitTimeUtc, 
-          @JsonProperty("startTimeUtc") Long startTimeUtc, 
-          @JsonProperty("endTimeUtc") Long endTimeUtc, 
-          @JsonProperty("currentStatus") String currentStatus, 
-          @JsonProperty("result") Object result, 
-          @JsonProperty("isError") boolean isError, 
-          @JsonProperty("isCancelled") boolean isCancelled, 
-          @JsonProperty("children") List<LinkWithMetadata> children,
-          @JsonProperty("submittedByTask") LinkWithMetadata submittedByTask,
-          @JsonProperty("blockingTask") LinkWithMetadata blockingTask,
-          @JsonProperty("blockingDetails") String blockingDetails,
-          @JsonProperty("detailedStatus") String detailedStatus,
-          @JsonProperty("streams") Map<String, LinkWithMetadata> streams,
-          @JsonProperty("links") Map<String, URI> links) {
-    this.id = id;
-    this.displayName = displayName;
-    this.description = description;
-    this.entityId = entityId;
-    this.entityDisplayName = entityDisplayName;
-    this.tags = (tags == null) ? ImmutableList.of() : ImmutableList.<Object>copyOf(tags);
-    this.submitTimeUtc = submitTimeUtc;
-    this.startTimeUtc = startTimeUtc;
-    this.endTimeUtc = endTimeUtc;
-    this.currentStatus = currentStatus;
-    this.result = result;
-    this.isError = isError;
-    this.isCancelled = isCancelled;
-    this.children = children;
-    this.blockingDetails = blockingDetails;
-    this.blockingTask = blockingTask;
-    this.submittedByTask = submittedByTask;
-    this.detailedStatus = detailedStatus;
-    this.streams = streams;
-    this.links = (links == null) ? ImmutableMap.<String, URI>of() : ImmutableMap.copyOf(links);
-}
+    private final String id;
+    private final String displayName;
+    private final String entityId;
+    private final String entityDisplayName;
+    private final String description;
+    private final Collection<Object> tags;
+
+    private final Long submitTimeUtc;
+    private final Long startTimeUtc;
+    private final Long endTimeUtc;
+
+    private final String currentStatus;
+    private final Object result;
+    private final boolean isError;
+    private final boolean isCancelled;
+
+    private final List<LinkWithMetadata> children;
+    private final LinkWithMetadata submittedByTask;
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    private final LinkWithMetadata blockingTask;
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    private final String blockingDetails;
+
+    private final String detailedStatus;
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    private final Map<String, LinkWithMetadata> streams;
+
+    private final Map<String, URI> links;
+
+    public TaskSummary(
+            @JsonProperty("id") String id, 
+            @JsonProperty("displayName") String displayName, 
+            @JsonProperty("description") String description, 
+            @JsonProperty("entityId") String entityId, 
+            @JsonProperty("entityDisplayName") String entityDisplayName, 
+            @JsonProperty("tags") Set<Object> tags,
+            @JsonProperty("submitTimeUtc") Long submitTimeUtc, 
+            @JsonProperty("startTimeUtc") Long startTimeUtc, 
+            @JsonProperty("endTimeUtc") Long endTimeUtc, 
+            @JsonProperty("currentStatus") String currentStatus, 
+            @JsonProperty("result") Object result, 
+            @JsonProperty("isError") boolean isError, 
+            @JsonProperty("isCancelled") boolean isCancelled, 
+            @JsonProperty("children") List<LinkWithMetadata> children,
+            @JsonProperty("submittedByTask") LinkWithMetadata submittedByTask,
+            @JsonProperty("blockingTask") LinkWithMetadata blockingTask,
+            @JsonProperty("blockingDetails") String blockingDetails,
+            @JsonProperty("detailedStatus") String detailedStatus,
+            @JsonProperty("streams") Map<String, LinkWithMetadata> streams,
+            @JsonProperty("links") Map<String, URI> links) {
+        this.id = id;
+        this.displayName = displayName;
+        this.description = description;
+        this.entityId = entityId;
+        this.entityDisplayName = entityDisplayName;
+        this.tags = (tags == null) ? ImmutableList.of() : ImmutableList.<Object> copyOf(tags);
+        this.submitTimeUtc = submitTimeUtc;
+        this.startTimeUtc = startTimeUtc;
+        this.endTimeUtc = endTimeUtc;
+        this.currentStatus = currentStatus;
+        this.result = result;
+        this.isError = isError;
+        this.isCancelled = isCancelled;
+        this.children = children;
+        this.blockingDetails = blockingDetails;
+        this.blockingTask = blockingTask;
+        this.submittedByTask = submittedByTask;
+        this.detailedStatus = detailedStatus;
+        this.streams = streams;
+        this.links = (links == null) ? ImmutableMap.<String, URI> of() : ImmutableMap.copyOf(links);
+    }
 
+    @Override
+    public String getId() {
+        return id;
+    }
 
-  @Override
-  public String getId() {
-      return id;
-  }
-  
-  public String getDisplayName() {
-    return displayName;
-  }
+    public String getDisplayName() {
+        return displayName;
+    }
 
-  public String getDescription() {
-    return description;
-  }
+    public String getDescription() {
+        return description;
+    }
 
-  public String getEntityId() {
-      return entityId;
-  }
-  
-  public String getEntityDisplayName() {
-      return entityDisplayName;
-  }
-  
-  public Collection<Object> getTags() {
-    List<Object> result = new ArrayList<Object>();
-    for (Object t: tags) {
-        // TODO if we had access to a mapper we could use it to give better json
-        result.add(Jsonya.convertToJsonPrimitive(t));
-    }
-    return result;
-  }
+    public String getEntityId() {
+        return entityId;
+    }
 
-  @JsonIgnore
-  public Collection<Object> getRawTags() {
-      return tags;
+    public String getEntityDisplayName() {
+        return entityDisplayName;
     }
 
-  public Long getSubmitTimeUtc() {
-    return submitTimeUtc;
-  }
+    public Collection<Object> getTags() {
+        List<Object> result = new ArrayList<Object>();
+        for (Object t : tags) {
+            // TODO if we had access to a mapper we could use it to give better json
+            result.add(Jsonya.convertToJsonPrimitive(t));
+        }
+        return result;
+    }
 
-  public Long getStartTimeUtc() {
-    return startTimeUtc;
-  }
+    @JsonIgnore
+    public Collection<Object> getRawTags() {
+        return tags;
+    }
 
-  public Long getEndTimeUtc() {
-    return endTimeUtc;
-  }
+    public Long getSubmitTimeUtc() {
+        return submitTimeUtc;
+    }
 
-  public String getCurrentStatus() {
-    return currentStatus;
-  }
+    public Long getStartTimeUtc() {
+        return startTimeUtc;
+    }
 
-  public Object getResult() {
-    return result;
-  }
+    public Long getEndTimeUtc() {
+        return endTimeUtc;
+    }
 
-  /** @deprecated since 0.7.0 use {@link #isError} instead. */
-  @Deprecated
-  @JsonIgnore
-  public boolean getIsError() {
-    return isError;
-  }
+    public String getCurrentStatus() {
+        return currentStatus;
+    }
 
-  /** @deprecated since 0.7.0 use {@link #isCancelled} instead. */
-  @Deprecated
-  @JsonIgnore
-  public boolean getIsCancelled() {
-    return isCancelled;
-  }
+    public Object getResult() {
+        return result;
+    }
 
-  public boolean isError() {
-    return isError;
-  }
+    /** @deprecated since 0.7.0 use {@link #isError} instead. */
+    @Deprecated
+    @JsonIgnore
+    public boolean getIsError() {
+        return isError;
+    }
 
-  public boolean isCancelled() {
-    return isCancelled;
-  }
+    /** @deprecated since 0.7.0 use {@link #isCancelled} instead. */
+    @Deprecated
+    @JsonIgnore
+    public boolean getIsCancelled() {
+        return isCancelled;
+    }
 
-  public List<LinkWithMetadata> getChildren() {
-      return children;
-  }
+    public boolean isError() {
+        return isError;
+    }
 
-  public LinkWithMetadata getSubmittedByTask() {
-      return submittedByTask;
-  }
-  
-  public LinkWithMetadata getBlockingTask() {
-    return blockingTask;
-  }
-  
-  public String getBlockingDetails() {
-    return blockingDetails;
-  }
+    public boolean isCancelled() {
+        return isCancelled;
+    }
 
-  public String getDetailedStatus() {
-      return detailedStatus;
-  }
-  
-  public Map<String, LinkWithMetadata> getStreams() {
-      return streams;
-  }
+    public List<LinkWithMetadata> getChildren() {
+        return children;
+    }
 
-  public Map<String, URI> getLinks() {
-      return links;
-  }
-  
-  @Override
-  public String toString() {
-    return "TaskSummary{" +
-        "id='" + id + '\'' +
-        ", displayName='" + displayName + '\'' +
-        ", currentStatus='" + currentStatus + '\'' +
-        ", startTimeUtc='" + startTimeUtc + '\'' +
-        ", endTimeUtc='" + endTimeUtc + '\'' +
-        '}';
+    public LinkWithMetadata getSubmittedByTask() {
+        return submittedByTask;
+    }
+
+    public LinkWithMetadata getBlockingTask() {
+        return blockingTask;
+    }
+
+    public String getBlockingDetails() {
+        return blockingDetails;
+    }
+
+    public String getDetailedStatus() {
+        return detailedStatus;
+    }
+
+    public Map<String, LinkWithMetadata> getStreams() {
+        return streams;
+    }
+
+    public Map<String, URI> getLinks() {
+        return links;
+    }
+
+    @Override
+    public String toString() {
+        return "TaskSummary{"
+                + "id='" + id + '\''
+                + ", displayName='" + displayName + '\''
+                + ", currentStatus='" + currentStatus + '\''
+                + ", startTimeUtc='" + startTimeUtc + '\''
+                + ", endTimeUtc='" + endTimeUtc + '\''
+                + '}';
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f7aa7627/usage/rest-api/src/main/java/brooklyn/rest/domain/UsageStatistic.java
----------------------------------------------------------------------
diff --git a/usage/rest-api/src/main/java/brooklyn/rest/domain/UsageStatistic.java b/usage/rest-api/src/main/java/brooklyn/rest/domain/UsageStatistic.java
index 64dfe97..1292f96 100644
--- a/usage/rest-api/src/main/java/brooklyn/rest/domain/UsageStatistic.java
+++ b/usage/rest-api/src/main/java/brooklyn/rest/domain/UsageStatistic.java
@@ -40,10 +40,14 @@ public class UsageStatistic implements HasId {
     private final long duration;
     private final Map<String,String> metadata;
 
-    public UsageStatistic(@JsonProperty("status") Status status, @JsonProperty("id") String
id, @JsonProperty("applicationId") String applicationId,
-                     @JsonProperty("start") String start,
-                     @JsonProperty("end") String end,
-                     @JsonProperty("duration") long duration, @JsonProperty("metadata") Map<String,
String> metadata) {
+    public UsageStatistic(
+            @JsonProperty("status") Status status, 
+            @JsonProperty("id") String id, 
+            @JsonProperty("applicationId") String applicationId,
+            @JsonProperty("start") String start,
+            @JsonProperty("end") String end,
+            @JsonProperty("duration") long duration, 
+            @JsonProperty("metadata") Map<String, String> metadata) {
         this.status = checkNotNull(status, "status");
         this.id = checkNotNull(id, "id");
         this.applicationId = applicationId;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f7aa7627/usage/rest-api/src/main/java/brooklyn/rest/domain/UsageStatistics.java
----------------------------------------------------------------------
diff --git a/usage/rest-api/src/main/java/brooklyn/rest/domain/UsageStatistics.java b/usage/rest-api/src/main/java/brooklyn/rest/domain/UsageStatistics.java
index c26a987..e654165 100644
--- a/usage/rest-api/src/main/java/brooklyn/rest/domain/UsageStatistics.java
+++ b/usage/rest-api/src/main/java/brooklyn/rest/domain/UsageStatistics.java
@@ -32,19 +32,18 @@ import com.google.common.collect.ImmutableMap;
  * @author Aled Sage
  */
 public class UsageStatistics {
-    
-    // TODO populate links with /apps endpoint to link to /usage/applications/{id}, to make
it more RESTy
-    
+
+    // TODO populate links with /apps endpoint to link to /usage/applications/{id}, to make
it more
+    // RESTy
+
     private final List<UsageStatistic> statistics;
     private final Map<String, URI> links;
 
-    public UsageStatistics(
-            @JsonProperty("statistics") List<UsageStatistic> statistics,
-            @JsonProperty("links") Map<String, URI> links
-    ) {
-        this.statistics = statistics == null ? ImmutableList.<UsageStatistic>of() :
ImmutableList.copyOf(statistics);
-        this.links = (links == null) ? ImmutableMap.<String, URI>of() : ImmutableMap.copyOf(links);
-      }
+    public UsageStatistics(@JsonProperty("statistics") List<UsageStatistic> statistics,
+                           @JsonProperty("links") Map<String, URI> links) {
+        this.statistics = statistics == null ? ImmutableList.<UsageStatistic> of()
: ImmutableList.copyOf(statistics);
+        this.links = (links == null) ? ImmutableMap.<String, URI> of() : ImmutableMap.copyOf(links);
+    }
 
     public List<UsageStatistic> getStatistics() {
         return statistics;
@@ -53,12 +52,13 @@ public class UsageStatistics {
     public Map<String, URI> getLinks() {
         return links;
     }
-    
+
     @Override
     public boolean equals(Object o) {
-        if (!(o instanceof UsageStatistics)) return false;
+        if (!(o instanceof UsageStatistics))
+            return false;
         UsageStatistics other = (UsageStatistics) o;
-        return Objects.equal(statistics,  other.statistics);
+        return Objects.equal(statistics, other.statistics);
     }
 
     @Override
@@ -68,9 +68,6 @@ public class UsageStatistics {
 
     @Override
     public String toString() {
-        return "UsageStatistics{" +
-                "statistics=" + statistics +
-                ", links=" + links +
-                '}';
+        return "UsageStatistics{" + "statistics=" + statistics + ", links=" + links + '}';
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f7aa7627/usage/rest-api/src/test/java/brooklyn/rest/domain/ApplicationSpecTest.java
----------------------------------------------------------------------
diff --git a/usage/rest-api/src/test/java/brooklyn/rest/domain/ApplicationSpecTest.java b/usage/rest-api/src/test/java/brooklyn/rest/domain/ApplicationSpecTest.java
index 7b1ecdc..6a4c540 100644
--- a/usage/rest-api/src/test/java/brooklyn/rest/domain/ApplicationSpecTest.java
+++ b/usage/rest-api/src/test/java/brooklyn/rest/domain/ApplicationSpecTest.java
@@ -32,25 +32,22 @@ import com.google.common.collect.ImmutableSet;
 
 public class ApplicationSpecTest {
 
-  final EntitySpec entitySpec = new EntitySpec("Vanilla Java App", "brooklyn.entity.java.VanillaJavaApp",
-      ImmutableMap.<String, String>of(
-          "initialSize", "1",
-          "creationScriptUrl", "http://my.brooklyn.io/storage/foo.sql"
-      ));
-
-  final ApplicationSpec applicationSpec = ApplicationSpec.builder().name("myapp").
-          entities(ImmutableSet.of(entitySpec)).locations(ImmutableSet.of("/v1/locations/1")).
-          build();
-
-  @Test
-  public void testSerializeToJSON() throws IOException {
-    assertEquals(asJson(applicationSpec), jsonFixture("fixtures/application-spec.json"));
-  }
-
-  @Test
-  public void testDeserializeFromJSON() throws IOException {
-    assertEquals(fromJson(jsonFixture("fixtures/application-spec.json"),
-        ApplicationSpec.class), applicationSpec);
-  }
-
+    final EntitySpec entitySpec = new EntitySpec("Vanilla Java App", "brooklyn.entity.java.VanillaJavaApp",
+            ImmutableMap.<String, String>of(
+                    "initialSize", "1",
+                    "creationScriptUrl", "http://my.brooklyn.io/storage/foo.sql"));
+
+    final ApplicationSpec applicationSpec = ApplicationSpec.builder().name("myapp")
+            .entities(ImmutableSet.of(entitySpec)).locations(ImmutableSet.of("/v1/locations/1"))
+            .build();
+
+    @Test
+    public void testSerializeToJSON() throws IOException {
+        assertEquals(asJson(applicationSpec), jsonFixture("fixtures/application-spec.json"));
+    }
+
+    @Test
+    public void testDeserializeFromJSON() throws IOException {
+        assertEquals(fromJson(jsonFixture("fixtures/application-spec.json"), ApplicationSpec.class),
applicationSpec);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f7aa7627/usage/rest-api/src/test/java/brooklyn/rest/domain/EffectorSummaryTest.java
----------------------------------------------------------------------
diff --git a/usage/rest-api/src/test/java/brooklyn/rest/domain/EffectorSummaryTest.java b/usage/rest-api/src/test/java/brooklyn/rest/domain/EffectorSummaryTest.java
index 21ef760..e2821ef 100644
--- a/usage/rest-api/src/test/java/brooklyn/rest/domain/EffectorSummaryTest.java
+++ b/usage/rest-api/src/test/java/brooklyn/rest/domain/EffectorSummaryTest.java
@@ -33,23 +33,21 @@ import com.google.common.collect.ImmutableSet;
 
 public class EffectorSummaryTest {
 
-  final EffectorSummary effectorSummary = new EffectorSummary(
-      "stop",
-      "void",
-      ImmutableSet.<EffectorSummary.ParameterSummary<?>>of(),
-      "Effector description",
-      ImmutableMap.of(
-          "self", URI.create("/v1/applications/redis-app/entities/redis-ent/effectors/stop")
-      )
-  );
-
-  @Test
-  public void testSerializeToJSON() throws IOException {
-    assertEquals(asJson(effectorSummary), jsonFixture("fixtures/effector-summary.json"));
-  }
-
-  @Test
-  public void testDeserializeFromJSON() throws IOException {
-    assertEquals(fromJson(jsonFixture("fixtures/effector-summary.json"), EffectorSummary.class),
effectorSummary);
-  }
+    final EffectorSummary effectorSummary = new EffectorSummary(
+            "stop",
+            "void",
+            ImmutableSet.<EffectorSummary.ParameterSummary<?>>of(),
+            "Effector description",
+            ImmutableMap.of(
+                    "self", URI.create("/v1/applications/redis-app/entities/redis-ent/effectors/stop")));
+
+    @Test
+    public void testSerializeToJSON() throws IOException {
+        assertEquals(asJson(effectorSummary), jsonFixture("fixtures/effector-summary.json"));
+    }
+
+    @Test
+    public void testDeserializeFromJSON() throws IOException {
+        assertEquals(fromJson(jsonFixture("fixtures/effector-summary.json"), EffectorSummary.class),
effectorSummary);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f7aa7627/usage/rest-api/src/test/java/brooklyn/rest/domain/EntitySpecTest.java
----------------------------------------------------------------------
diff --git a/usage/rest-api/src/test/java/brooklyn/rest/domain/EntitySpecTest.java b/usage/rest-api/src/test/java/brooklyn/rest/domain/EntitySpecTest.java
index b53bdaa..08b47e5 100644
--- a/usage/rest-api/src/test/java/brooklyn/rest/domain/EntitySpecTest.java
+++ b/usage/rest-api/src/test/java/brooklyn/rest/domain/EntitySpecTest.java
@@ -29,22 +29,22 @@ import org.testng.annotations.Test;
 
 public class EntitySpecTest {
 
-  final EntitySpec entitySpec = new EntitySpec("Vanilla Java App", "brooklyn.entity.java.VanillaJavaApp");
-
-  @Test
-  public void testSerializeToJSON() throws IOException {
-    assertEquals(asJson(new EntitySpec[]{entitySpec}), jsonFixture("fixtures/entity.json"));
-  }
-
-  @Test
-  public void testDeserializeFromJSON() throws IOException {
-    assertEquals(fromJson(jsonFixture("fixtures/entity.json"), EntitySpec[].class), new EntitySpec[]{entitySpec});
-  }
-
-  @Test
-  public void testDeserializeFromJSONOnlyWithType() throws IOException {
-    EntitySpec actual = fromJson(jsonFixture("fixtures/entity-only-type.json"), EntitySpec.class);
-    assertEquals(actual.getName(), actual.getType());
-    assertEquals(actual.getConfig().size(), 0);
-  }
+    final EntitySpec entitySpec = new EntitySpec("Vanilla Java App", "brooklyn.entity.java.VanillaJavaApp");
+
+    @Test
+    public void testSerializeToJSON() throws IOException {
+        assertEquals(asJson(new EntitySpec[] { entitySpec }), jsonFixture("fixtures/entity.json"));
+    }
+
+    @Test
+    public void testDeserializeFromJSON() throws IOException {
+        assertEquals(fromJson(jsonFixture("fixtures/entity.json"), EntitySpec[].class), new
EntitySpec[] { entitySpec });
+    }
+
+    @Test
+    public void testDeserializeFromJSONOnlyWithType() throws IOException {
+        EntitySpec actual = fromJson(jsonFixture("fixtures/entity-only-type.json"), EntitySpec.class);
+        assertEquals(actual.getName(), actual.getType());
+        assertEquals(actual.getConfig().size(), 0);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f7aa7627/usage/rest-api/src/test/java/brooklyn/rest/domain/EntitySummaryTest.java
----------------------------------------------------------------------
diff --git a/usage/rest-api/src/test/java/brooklyn/rest/domain/EntitySummaryTest.java b/usage/rest-api/src/test/java/brooklyn/rest/domain/EntitySummaryTest.java
index 242be13..fb976e1 100644
--- a/usage/rest-api/src/test/java/brooklyn/rest/domain/EntitySummaryTest.java
+++ b/usage/rest-api/src/test/java/brooklyn/rest/domain/EntitySummaryTest.java
@@ -33,29 +33,29 @@ import com.google.common.collect.Maps;
 
 public class EntitySummaryTest {
 
-  static final Map<String, URI> links;
-  static {
-    links = Maps.newLinkedHashMap();
-    links.put("self", URI.create("/v1/applications/tesr/entities/zQsqdXzi"));
-    links.put("catalog", URI.create("/v1/catalog/entities/brooklyn.entity.webapp.tomcat.TomcatServer"));
-    links.put("application", URI.create("/v1/applications/tesr"));
-    links.put("children", URI.create("/v1/applications/tesr/entities/zQsqdXzi/children"));
-    links.put("effectors", URI.create("fixtures/effector-summary-list.json"));
-    links.put("sensors", URI.create("fixtures/sensor-summary-list.json"));
-    links.put("activities", URI.create("fixtures/task-summary-list.json"));
-  }
-
-  static final EntitySummary entitySummary = new EntitySummary(
-          "zQsqdXzi", "MyTomcat", "brooklyn.entity.webapp.tomcat.TomcatServer", null, links);
-
-  @Test
-  public void testSerializeToJSON() throws IOException {
-    assertEquals(asJson(entitySummary), jsonFixture("fixtures/entity-summary.json"));
-  }
-
-  @Test
-  public void testDeserializeFromJSON() throws IOException {
-    assertEquals(fromJson(jsonFixture("fixtures/entity-summary.json"), EntitySummary.class),
entitySummary);
-  }
+    static final Map<String, URI> links;
+    static {
+        links = Maps.newLinkedHashMap();
+        links.put("self", URI.create("/v1/applications/tesr/entities/zQsqdXzi"));
+        links.put("catalog", URI.create("/v1/catalog/entities/brooklyn.entity.webapp.tomcat.TomcatServer"));
+        links.put("application", URI.create("/v1/applications/tesr"));
+        links.put("children", URI.create("/v1/applications/tesr/entities/zQsqdXzi/children"));
+        links.put("effectors", URI.create("fixtures/effector-summary-list.json"));
+        links.put("sensors", URI.create("fixtures/sensor-summary-list.json"));
+        links.put("activities", URI.create("fixtures/task-summary-list.json"));
+    }
+
+    static final EntitySummary entitySummary = new EntitySummary("zQsqdXzi", "MyTomcat",
+            "brooklyn.entity.webapp.tomcat.TomcatServer", null, links);
+
+    @Test
+    public void testSerializeToJSON() throws IOException {
+        assertEquals(asJson(entitySummary), jsonFixture("fixtures/entity-summary.json"));
+    }
+
+    @Test
+    public void testDeserializeFromJSON() throws IOException {
+        assertEquals(fromJson(jsonFixture("fixtures/entity-summary.json"), EntitySummary.class),
entitySummary);
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f7aa7627/usage/rest-api/src/test/java/brooklyn/rest/domain/LocationSpecTest.java
----------------------------------------------------------------------
diff --git a/usage/rest-api/src/test/java/brooklyn/rest/domain/LocationSpecTest.java b/usage/rest-api/src/test/java/brooklyn/rest/domain/LocationSpecTest.java
index 6bd9863..84ac29f 100644
--- a/usage/rest-api/src/test/java/brooklyn/rest/domain/LocationSpecTest.java
+++ b/usage/rest-api/src/test/java/brooklyn/rest/domain/LocationSpecTest.java
@@ -33,26 +33,26 @@ public class LocationSpecTest {
 
     // TODO when removing the deprecated class this tests, change the tests here to point
at LocationSummary
     
-  final LocationSpec locationSpec = LocationSpec.localhost();
+    final LocationSpec locationSpec = LocationSpec.localhost();
 
-  @Test
-  public void testSerializeToJSON() throws IOException {
-    assertEquals(asJson(locationSpec), jsonFixture("fixtures/location.json"));
-  }
+    @Test
+    public void testSerializeToJSON() throws IOException {
+        assertEquals(asJson(locationSpec), jsonFixture("fixtures/location.json"));
+    }
 
-  @Test
-  public void testDeserializeFromJSON() throws IOException {
-    assertEquals(fromJson(jsonFixture("fixtures/location.json"), LocationSpec.class), locationSpec);
-  }
+    @Test
+    public void testDeserializeFromJSON() throws IOException {
+        assertEquals(fromJson(jsonFixture("fixtures/location.json"), LocationSpec.class),
locationSpec);
+    }
 
-  @Test
-  public void testDeserializeFromJSONWithNoCredential() throws IOException {
-    LocationSpec loaded = fromJson(jsonFixture("fixtures/location-without-credential.json"),
LocationSpec.class);
+    @Test
+    public void testDeserializeFromJSONWithNoCredential() throws IOException {
+        LocationSpec loaded = fromJson(jsonFixture("fixtures/location-without-credential.json"),
LocationSpec.class);
 
-    assertEquals(loaded.getSpec(), locationSpec.getSpec());
-    
-    assertEquals(loaded.getConfig().size(), 1);
-    assertEquals(loaded.getConfig().get("identity"), "bob");
-    assertNull(loaded.getConfig().get("credential"));
-  }
+        assertEquals(loaded.getSpec(), locationSpec.getSpec());
+
+        assertEquals(loaded.getConfig().size(), 1);
+        assertEquals(loaded.getConfig().get("identity"), "bob");
+        assertNull(loaded.getConfig().get("credential"));
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f7aa7627/usage/rest-api/src/test/java/brooklyn/rest/util/RestApiTestUtils.java
----------------------------------------------------------------------
diff --git a/usage/rest-api/src/test/java/brooklyn/rest/util/RestApiTestUtils.java b/usage/rest-api/src/test/java/brooklyn/rest/util/RestApiTestUtils.java
index ec83ac0..9f6d7f1 100644
--- a/usage/rest-api/src/test/java/brooklyn/rest/util/RestApiTestUtils.java
+++ b/usage/rest-api/src/test/java/brooklyn/rest/util/RestApiTestUtils.java
@@ -55,5 +55,4 @@ public class RestApiTestUtils {
             throw Exceptions.propagate(e);
         }
     }
-
 }


Mime
View raw message