There shouldn't be a bunch of main methods lying around in every random class to test it. See raspivid-j for one potential way of setting this up