public int concurrentJobs(Class jobClass) {
        int concurrent = 0;

        for (final SystemJob job : jobs.values()) {
            if (job.getClass().equals(jobClass)) {
                concurrent += 1;
            }
        }

        return concurrent;
    }
@Test
    public void testConcurrentJobs() throws Exception {
        SystemJobManager manager = new SystemJobManager(systemMessageActivityWriter, new MetricRegistry());

        SystemJob job1 = new LongRunningJob(3);
        SystemJob job2 = new LongRunningJob(3);
        SystemJob job3 = new AnotherLongRunningJob(3);

        manager.submit(job1);
        manager.submit(job2);
        manager.submit(job3);

        assertEquals(3, manager.getRunningJobs().size());
        assertEquals(2, manager.concurrentJobs(job1.getClass()));
    }