Github user aledsage commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/359#discussion_r81085872 --- Diff: utils/common/src/main/java/org/apache/brooklyn/test/Asserts.java --- @@ -1381,4 +1381,18 @@ public static void assertSize(Iterable<?> list, int expectedSize) { if (Iterables.size(list)!=expectedSize) fail("List has wrong size "+Iterables.size(list)+" (expected "+expectedSize+"): "+list); } + public static void assertInstanceOf(Object obj, Class<?> type) { + assertThat(obj, Predicates.instanceOf(type)); --- End diff -- Not convinced that this is useful (thought agree it can be made so, to make the test more explicit). It gives less information about the problem than a good old fasioned `ClassCastException`: it doesn't tell you what type `obj` is (just its `toString`).
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---