@Override
    public boolean contains(Object o) {
        if (o instanceof Uuid) {
            Uuid topicId = (Uuid) o;
            TopicImage topicImage = image.getTopic(topicId);
            if (topicImage == null) return false;
            return topicNames.contains(topicImage.name());
        }
        return false;
    }
@Test
    public void testContains() {
        Uuid fooUuid = Uuid.randomUuid();
        Uuid barUuid = Uuid.randomUuid();
        Uuid bazUuid = Uuid.randomUuid();
        Uuid quxUuid = Uuid.randomUuid();
        TopicsImage topicsImage = new MetadataImageBuilder()
            .addTopic(fooUuid, "foo", 3)
            .addTopic(barUuid, "bar", 3)
            .addTopic(bazUuid, "qux", 3)
            .build()
            .topics();

        Set<Uuid> topicIds = new TopicIds(mkSet("foo", "bar", "baz"), topicsImage);

        assertTrue(topicIds.contains(fooUuid));
        assertTrue(topicIds.contains(barUuid));
        assertFalse(topicIds.contains(bazUuid));
        assertFalse(topicIds.contains(quxUuid));
    }