@Test public void shouldNotReturnAppliedMigrationsWhenNoneAvailable() { when(migraMongo.getMigrationEntries()).thenReturn(Collections.emptyList()); final String history = migraMongoJMX.history(); final List<MigrationEntry> entriesRetrieved = new Gson() .fromJson(history, new TypeToken<List<MigrationEntry>>() {}.getType()); assertThat(entriesRetrieved, hasSize(0)); }
@ManagedOperation public String history() { return toJson(migraMongo.getMigrationEntries()); }
MigraMongoJMX { @ManagedOperation public String history() { return toJson(migraMongo.getMigrationEntries()); } }
MigraMongoJMX { @ManagedOperation public String history() { return toJson(migraMongo.getMigrationEntries()); } MigraMongoJMX(MigraMongo migraMongo); }
MigraMongoJMX { @ManagedOperation public String history() { return toJson(migraMongo.getMigrationEntries()); } MigraMongoJMX(MigraMongo migraMongo); @ManagedOperation String migrate(); @ManagedOperation String migrateAsync(); @ManagedOperation String dryRun(); @ManagedOperation String status(String fromVersion); @ManagedOperation Boolean needsMigration(); @ManagedOperation String history(); @ManagedOperation void destroyLocks(); }
MigraMongoJMX { @ManagedOperation public String history() { return toJson(migraMongo.getMigrationEntries()); } MigraMongoJMX(MigraMongo migraMongo); @ManagedOperation String migrate(); @ManagedOperation String migrateAsync(); @ManagedOperation String dryRun(); @ManagedOperation String status(String fromVersion); @ManagedOperation Boolean needsMigration(); @ManagedOperation String history(); @ManagedOperation void destroyLocks();  }