diff --git a/src/main/java/org/springframework/hateoas/ResourceSupport.java b/src/main/java/org/springframework/hateoas/ResourceSupport.java index 3879b18a..64de7207 100755 --- a/src/main/java/org/springframework/hateoas/ResourceSupport.java +++ b/src/main/java/org/springframework/hateoas/ResourceSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/hateoas/ResourceSupportUnitTest.java b/src/test/java/org/springframework/hateoas/ResourceSupportUnitTest.java index 3b07a8ff..a30cc72a 100644 --- a/src/test/java/org/springframework/hateoas/ResourceSupportUnitTest.java +++ b/src/test/java/org/springframework/hateoas/ResourceSupportUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -143,4 +143,17 @@ public class ResourceSupportUnitTest { ResourceSupport support = new ResourceSupport(); assertThat(support.equals(null), is(false)); } + + /** + * @see #267 + */ + @Test + public void addsLinksViaVarargs() { + + ResourceSupport support = new ResourceSupport(); + support.add(new Link("/self", "self"), new Link("/another", "another")); + + assertThat(support.hasLink("self"), is(true)); + assertThat(support.hasLink("another"), is(true)); + } }