### Question:
KafkaStreams { public Collection<StreamsMetadata> allMetadataForStore(final String storeName) { validateIsRunning(); return streamsMetadataState.getAllMetadataForStore(storeName); } KafkaStreams(final TopologyBuilder builder, final Properties props);  KafkaStreams(final TopologyBuilder builder, final StreamsConfig config);  KafkaStreams(final TopologyBuilder builder,
                        final StreamsConfig config,
                        final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName,
                                              final K key,
                                              final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName,
                                              final K key,
                                              final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType);  }### Answer:
@Test(expected = IllegalStateException.class) public void shouldNotGetAllTasksWithStoreWhenNotRunning() throws Exception { streams.allMetadataForStore("store"); }