@Test
@SuppressWarnings("unchecked")
public void rejectsUnmanagedEntity() {
EntityLinks links = new ControllerEntityLinks(
Arrays.asList(SampleController.class, ControllerWithParameters.class), linkBuilderFactory);
assertThat(links.supports(Person.class), is(true));
assertThat(links.supports(Order.class), is(true));
assertThat(links.supports(SampleController.class), is(false));
thrown.expect(IllegalArgumentException.class);
thrown.expectMessage(SampleController.class.getName());
thrown.expectMessage(ExposesResourceFor.class.getName());
links.linkFor(SampleController.class);
}